Closed Bug 687081 Opened 9 years ago Closed 8 years ago

Add telemetry for time to find a cache entry


(Core :: Networking: Cache, defect)

Not set





(Reporter: u408661, Assigned: u408661)



(1 file, 1 obsolete file)

6.26 KB, patch
: review+
Details | Diff | Splinter Review
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?
Attached patch timing patch (obsolete) — Splinter Review
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+
Attached patch updated patchSplinter Review
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
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.