Skip to content

Raw Logs API: request_time / origin_time units #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ledbettj opened this issue Jun 5, 2018 · 0 comments
Open

Raw Logs API: request_time / origin_time units #14

ledbettj opened this issue Jun 5, 2018 · 0 comments

Comments

@ledbettj
Copy link

ledbettj commented Jun 5, 2018

Hi,

On the Raw Logs API Documentation it says:

Response Field Description
request_time Time in milliseconds for request to complete
origin_time How long it takes MaxCDN to retrieve the file (if cache status was a MISS)

As I understand it, that means request time is how long it took to serve the content to the browser, and origin time is the time required to load the resource from upstream in case of a cache miss. Please let me know if I've misunderstood here :)

When looking through the values returned from the API, I see the following:

  • Almost all cache HITs have a request_time of zero. I did see a few that had decimal results like 0.044.
  • For cache MISSes, both request_time and origin_time are in the 0.xx range.

For example, using the ruby client:

[29] pry(main)> client.get('v3/reporting/logs.json', limit: 5, status: '200',
                           cache_status: 'MISS')['records'].
                           map  { |r| [r['request_time'], r['origin_time']] }
=> [[0.052, 0.052],
 [0.018, 0.018],
 [0.581, 0.58],
 [0.048, 0.048],
 [0.035, 0.035]]

As a result I have several questions/issues:

  • The docs are incorrect and these units are seconds, right?
  • Why are all the responses for cache HITs zero? Even if these units are seconds I would expect to see response times in the low milliseconds. a recorded response time of zero is not useful for tracking performance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant