Closed Bug 687081 Opened 13 years ago Closed 13 years ago

Add telemetry for time to find a cache entry

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: u408661, Assigned: u408661)

Details

Attachments

(1 file, 1 obsolete file)

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
https://hg.mozilla.org/mozilla-central/rev/42be7e75a8fe
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: