Commit ab125b73 authored by mbelshe@chromium.org's avatar mbelshe@chromium.org

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
parent dfa34301
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/metrics/field_trial.h" #include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/metrics/stats_counters.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/string_util.h" #include "base/string_util.h"
#include "base/stringprintf.h" #include "base/stringprintf.h"
...@@ -701,6 +702,7 @@ EntryImpl* BackendImpl::OpenEntryImpl(const std::string& key) { ...@@ -701,6 +702,7 @@ EntryImpl* BackendImpl::OpenEntryImpl(const std::string& key) {
CACHE_UMA(AGE_MS, "OpenTime", GetSizeGroup(), start); CACHE_UMA(AGE_MS, "OpenTime", GetSizeGroup(), start);
stats_.OnEvent(Stats::OPEN_HIT); stats_.OnEvent(Stats::OPEN_HIT);
SIMPLE_STATS_COUNTER("disk_cache.hit");
return cache_entry; return cache_entry;
} }
...@@ -786,6 +788,7 @@ EntryImpl* BackendImpl::CreateEntryImpl(const std::string& key) { ...@@ -786,6 +788,7 @@ EntryImpl* BackendImpl::CreateEntryImpl(const std::string& key) {
CACHE_UMA(AGE_MS, "CreateTime", GetSizeGroup(), start); CACHE_UMA(AGE_MS, "CreateTime", GetSizeGroup(), start);
stats_.OnEvent(Stats::CREATE_HIT); stats_.OnEvent(Stats::CREATE_HIT);
SIMPLE_STATS_COUNTER("disk_cache.miss");
Trace("create entry hit "); Trace("create entry hit ");
return cache_entry.release(); return cache_entry.release();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment