summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.cc
diff options
context:
space:
mode:
authorrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 01:17:51 +0000
committerrvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 01:17:51 +0000
commitad4984168f95ab7b519577fc2434cd9f270168e6 (patch)
tree73a371036751e8deace5c0367c80ecd9b7a8b2eb /net/disk_cache/backend_impl.cc
parent64ce9d05bec75b48bba0814868c9bf472ba3eebb (diff)
downloadchromium_src-ad4984168f95ab7b519577fc2434cd9f270168e6.zip
chromium_src-ad4984168f95ab7b519577fc2434cd9f270168e6.tar.gz
chromium_src-ad4984168f95ab7b519577fc2434cd9f270168e6.tar.bz2
Disk cache: Track evictions of ga.js.
The purpose is to understand the cache behavior with very popular resources. BUG=147383 TEST=none Review URL: https://chromiumcodereview.appspot.com/11000062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161468 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r--net/disk_cache/backend_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 2de5952..e7fd5d6 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -1538,6 +1538,7 @@ void BackendImpl::RestartCache(bool failure) {
int64 errors = stats_.GetCounter(Stats::FATAL_ERROR);
int64 full_dooms = stats_.GetCounter(Stats::DOOM_CACHE);
int64 partial_dooms = stats_.GetCounter(Stats::DOOM_RECENT);
+ int64 ga_evictions = stats_.GetCounter(Stats::GAJS_EVICTED);
int64 last_report = stats_.GetCounter(Stats::LAST_REPORT);
PrepareForRestart();
@@ -1557,6 +1558,7 @@ void BackendImpl::RestartCache(bool failure) {
stats_.SetCounter(Stats::FATAL_ERROR, errors);
stats_.SetCounter(Stats::DOOM_CACHE, full_dooms);
stats_.SetCounter(Stats::DOOM_RECENT, partial_dooms);
+ stats_.SetCounter(Stats::GAJS_EVICTED, ga_evictions);
stats_.SetCounter(Stats::LAST_REPORT, last_report);
}
}
@@ -2013,9 +2015,12 @@ void BackendImpl::ReportStats() {
static_cast<int>(stats_.GetCounter(Stats::DOOM_CACHE)));
CACHE_UMA(COUNTS_10000, "TotalDoomRecentEntries", 0,
static_cast<int>(stats_.GetCounter(Stats::DOOM_RECENT)));
+ CACHE_UMA(COUNTS_10000, "TotalEvictionsGaJs", 0,
+ static_cast<int>(stats_.GetCounter(Stats::GAJS_EVICTED)));
stats_.SetCounter(Stats::FATAL_ERROR, 0);
stats_.SetCounter(Stats::DOOM_CACHE, 0);
stats_.SetCounter(Stats::DOOM_RECENT, 0);
+ stats_.SetCounter(Stats::GAJS_EVICTED, 0);
int64 total_hours = stats_.GetCounter(Stats::TIMER) / 120;
if (!data_->header.create_time || !data_->header.lru.filled) {