diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-18 05:26:16 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-18 05:26:16 +0000 |
commit | ab125b734022b4ec7be6308ac8087bbc1b072cb9 (patch) | |
tree | 1d8a71faae4f150fe81a01fcd0530c2ef3c1ce50 | |
parent | dfa34301d94e7cfb5c92162e4be2a04a666b0882 (diff) | |
download | chromium_src-ab125b734022b4ec7be6308ac8087bbc1b072cb9.zip chromium_src-ab125b734022b4ec7be6308ac8087bbc1b072cb9.tar.gz chromium_src-ab125b734022b4ec7be6308ac8087bbc1b072cb9.tar.bz2 |
Add stats-table counters to the disk cache so we can expose stats through
the benchmark lab.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6519042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75364 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/disk_cache/backend_impl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 739af0b..7fc1639 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -9,6 +9,7 @@ #include "base/message_loop.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram.h" +#include "base/metrics/stats_counters.h" #include "base/rand_util.h" #include "base/string_util.h" #include "base/stringprintf.h" @@ -701,6 +702,7 @@ EntryImpl* BackendImpl::OpenEntryImpl(const std::string& key) { CACHE_UMA(AGE_MS, "OpenTime", GetSizeGroup(), start); stats_.OnEvent(Stats::OPEN_HIT); + SIMPLE_STATS_COUNTER("disk_cache.hit"); return cache_entry; } @@ -786,6 +788,7 @@ EntryImpl* BackendImpl::CreateEntryImpl(const std::string& key) { CACHE_UMA(AGE_MS, "CreateTime", GetSizeGroup(), start); stats_.OnEvent(Stats::CREATE_HIT); + SIMPLE_STATS_COUNTER("disk_cache.miss"); Trace("create entry hit "); return cache_entry.release(); } |