The default bug view has changed. See this FAQ.

Add telemetry for time to find a cache entry

RESOLVED FIXED in mozilla10



Networking: Cache
6 years ago
6 years ago


(Reporter: nwgh, Assigned: nwgh)



Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)

Want to know how long we're spending searching the cache in total, as well as how long we're spending on each of memory/disk/offline. Could try to correlate with cache miss somehow, too?
Created attachment 563109 [details] [diff] [review]
timing patch

Patch that measures time to lookup cache entries in us (originally did this with telemetry autotimers, but since those are in ms the results weren't very interesting to look at)
Attachment #563109 - Flags: review?(jduell.mcbugs)
Comment on attachment 563109 [details] [diff] [review]
timing patch

Review of attachment 563109 [details] [diff] [review]:

+r so long as you change all the places where you call telemetry code at every return point in the function to instead just use a Telemetry::AutoTimer.   If there are cases where you don't want to record telemetry when returning from an error (seems to be the case in nsCacheService::SearchCacheDevices) then at least replace 

  Telemetry::Accumulate(Telemetry::CACHE_DEVICE_SEARCH, static_cast<PRInt32>(PR_Now() - start));

  with AccumulateTimeDelta(Telemetry::CACHE_DEVICE_SEARCH, start);

I wonder if the memory cache is going to show useful metrics--I'd expect it to always return in <1 ms.   No harm in trying...
Attachment #563109 - Flags: review?(jduell.mcbugs) → review+
Created attachment 570316 [details] [diff] [review]
updated patch

Updated to use autotimers everywhere. This is the patch that was pushed to try above.
Attachment #563109 - Attachment is obsolete: true
Attachment #570316 - Flags: review+
Try looks good
Keywords: checkin-needed
Keywords: checkin-needed
Target Milestone: --- → mozilla10
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.