Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: net/disk_cache/backend_impl.cc

Issue 6519042: Add stats-table counters to the disk cache so we can expose stats through... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.cc
===================================================================
--- net/disk_cache/backend_impl.cc (revision 74821)
+++ net/disk_cache/backend_impl.cc (working copy)
@@ -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"
@@ -698,6 +699,7 @@
CACHE_UMA(AGE_MS, "OpenTime", GetSizeGroup(), start);
stats_.OnEvent(Stats::OPEN_HIT);
+ SIMPLE_STATS_COUNTER("disk_cache.hit");
return cache_entry;
}
@@ -783,6 +785,7 @@
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698