The default bug view has changed. See this FAQ.

Add telemetry for time to find a cache entry

RESOLVED FIXED in mozilla10

Status

()

Core
Networking: Cache
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: nwgh, Assigned: nwgh)

Tracking

unspecified
mozilla10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(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+
https://tbpl.mozilla.org/?tree=Try&rev=975d9ec99a99
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
http://hg.mozilla.org/integration/mozilla-inbound/rev/42be7e75a8fe
Keywords: checkin-needed
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/42be7e75a8fe
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.