telemetry: gather stats on how often disk cache is corrupt.

RESOLVED FIXED in mozilla14



Networking: Cache
6 years ago
5 years ago


(Reporter: jduell, Assigned: jduell)



Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)

Created attachment 577314 [details] [diff] [review]
v1  gather stats on how often disk cache is corrupt.

Like it says.  One nuance: don't gather a statistic (either false or true) if the cache is new (new profile/user): we want to be able to divide true/false to get the % of restarts where we see a corrupt cache.

Note that until this lands and we have data, SHUTDOWN_OK is probably a fairly good approximation.
Attachment #577314 - Flags: review?(bjarne)

Comment 1

6 years ago
Comment on attachment 577314 [details] [diff] [review]
v1  gather stats on how often disk cache is corrupt.

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

Weird..  didn't I review something like this some time ago? (Maybe I forgot to submit..?)

Anyway - I'd propose to combine this with the existing timer in OpenDiskCache() so that we get separate timing info for opening corrupted and working caches. The actual working/corrupted-ratio can be estimated by looking at the number of submissions (which will not be absolutely accurate, but with large enough numbers should give a nice indication).

If you don't want to combine them, the code is fine and r+. However, I'm clearing the review-request so that you can re-request if you decide to combine.
Attachment #577314 - Flags: review?(bjarne)

Comment 2

6 years ago
Created attachment 610758 [details] [diff] [review]
v2: unbitrotted


I just found and unbitrotted this patch.  Do you think I should implement Bjarne's idea (if we did, I think we'd want to still keep this boolean metric so we know what % of the time the cache is corrupt), or just take this as it is?
Assignee: nobody → jduell.mcbugs
Attachment #577314 - Attachment is obsolete: true
Attachment #610758 - Flags: review?(michal.novotny)
Comment on attachment 610758 [details] [diff] [review]
v2: unbitrotted

I don't think we really need to separate timings by working and corrupted caches. Time spent opening a corrupted cache should be always lower that in case of a working cache, so it won't affect the telemetry data in a bad way. I.e. high values in case of NETWORK_DISK_CACHE_OPEN should always represent opening a working cache. BTW ratio of opening corrupted and working cache should be pretty low and if it isn't we have a bigger problem than inaccurate NETWORK_DISK_CACHE_OPEN telemetry.
Attachment #610758 - Flags: review?(michal.novotny) → review+

Comment 4

6 years ago
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.