summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 21:49:00 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 21:49:00 +0000
commit97ac07d0ffcca8e53812577472d62d76ae862d7b (patch)
tree00dc361586c14cb572a6aa3194758fb8b0fec059 /net/disk_cache/backend_impl.h
parent8e261756c62de3737c5dc9b9418857e2b58a7618 (diff)
downloadchromium_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/backend_impl.h')
-rw-r--r--net/disk_cache/backend_impl.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/backend_impl.h
index def2119..fd1f9be 100644
--- a/net/disk_cache/backend_impl.h
+++ b/net/disk_cache/backend_impl.h
@@ -100,6 +100,14 @@ class BackendImpl : public Backend {
// Logs requests that are denied due to being too big.
void TooMuchStorageRequested(int32 size);
+ // Returns true if we should send histograms for this user again. The caller
+ // must call this function only once per run (because it returns always the
+ // same thing on a given run).
+ bool ShouldReportAgain();
+
+ // Reports some data when we filled up the cache.
+ void FirstEviction();
+
// Reports a critical error (and disables the cache).
void CriticalError(int error);
@@ -182,6 +190,9 @@ class BackendImpl : public Backend {
// Dumps current cache statistics to the log.
void LogStats();
+ // Send UMA stats.
+ void ReportStats();
+
// Upgrades the index file to version 2.1.
void UpgradeTo2_1();
@@ -204,7 +215,7 @@ class BackendImpl : public Backend {
Eviction eviction_; // Handler of the eviction algorithm.
int num_refs_; // Number of referenced cache entries.
int max_refs_; // Max number of referenced cache entries.
- int num_pending_io_; // Number of pending IO operations;
+ int num_pending_io_; // Number of pending IO operations.
bool init_; // controls the initialization of the system.
bool restarted_;
bool unit_test_;