diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-20 21:49:00 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-20 21:49:00 +0000 |
commit | 97ac07d0ffcca8e53812577472d62d76ae862d7b (patch) | |
tree | 00dc361586c14cb572a6aa3194758fb8b0fec059 /net/disk_cache/stats.h | |
parent | 8e261756c62de3737c5dc9b9418857e2b58a7618 (diff) | |
download | chromium_src-97ac07d0ffcca8e53812577472d62d76ae862d7b.zip chromium_src-97ac07d0ffcca8e53812577472d62d76ae862d7b.tar.gz chromium_src-97ac07d0ffcca8e53812577472d62d76ae862d7b.tar.bz2 |
Disk cache: More instrumentation for the cache.
Now we separate data between before and after the cache
is full. Also, reduce the rate at which a particular
client sends data to be only once a week. The effect is
that the histogram data will only have one value per client,
and the same client will not be "voting" on more than one
version (release) at the same time.
Review URL: http://codereview.chromium.org/50063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/stats.h')
-rw-r--r-- | net/disk_cache/stats.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/disk_cache/stats.h b/net/disk_cache/stats.h index 6658df6..32585d4 100644 --- a/net/disk_cache/stats.h +++ b/net/disk_cache/stats.h @@ -42,6 +42,8 @@ class Stats { OPEN_RANKINGS, // An entry has to be read just to modify rankings. GET_RANKINGS, // We got the ranking info without reading the whole entry. FATAL_ERROR, + LAST_REPORT, // Time of the last time we sent a report. + LAST_REPORT_TIMER, // Timer count since last report. MAX_COUNTER }; @@ -59,6 +61,12 @@ class Stats { int64 GetCounter(Counters counter) const; void GetItems(StatsItems* items); + int GetHitRatio() const; + int GetResurrectRatio() const; + void ResetRatios(); + + // Returns the lower bound of the space used by entries bigger than 512 KB. + int GetLargeEntriesSize(); // Saves the stats to disk. void Store(); @@ -70,6 +78,7 @@ class Stats { private: int GetStatsBucket(int32 size); + int GetRatio(Counters hit, Counters miss) const; BackendImpl* backend_; uint32 storage_addr_; |