diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-24 19:08:22 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-24 19:08:22 +0000 |
commit | b1c4b8615fd74be7db0c1211ad1d316252b99079 (patch) | |
tree | 266c36550be883f876b2c030bde46b49d12243b5 /net | |
parent | 25df6963a4c9b0c7f5f912220955a67d3b72ee1b (diff) | |
download | chromium_src-b1c4b8615fd74be7db0c1211ad1d316252b99079.zip chromium_src-b1c4b8615fd74be7db0c1211ad1d316252b99079.tar.gz chromium_src-b1c4b8615fd74be7db0c1211ad1d316252b99079.tar.bz2 |
Disk Cache: Remove traces of old experiment.
BUG=147383
TEST=none
R=gavinp@chromium.org
Review URL: https://codereview.chromium.org/15594003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 5 | ||||
-rw-r--r-- | net/disk_cache/eviction.cc | 6 | ||||
-rw-r--r-- | net/disk_cache/stats.cc | 5 | ||||
-rw-r--r-- | net/disk_cache/stats.h | 2 |
4 files changed, 6 insertions, 12 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 9322443..5c89376 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -1412,7 +1412,6 @@ 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(); @@ -1432,7 +1431,6 @@ 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); } } @@ -1890,12 +1888,9 @@ 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) { diff --git a/net/disk_cache/eviction.cc b/net/disk_cache/eviction.cc index d2378e6..4906dfe 100644 --- a/net/disk_cache/eviction.cc +++ b/net/disk_cache/eviction.cc @@ -299,13 +299,9 @@ bool Eviction::EvictEntry(CacheRankingsBlock* node, bool empty, entry->entry()->Store(); rankings_->Insert(entry->rankings(), true, Rankings::DELETED); } - if (!empty) { + if (!empty) backend_->OnEvent(Stats::TRIM_ENTRY); - static const char gajs[] = "http://www.google-analytics.com/ga.js"; - if (!entry->GetKey().compare(gajs)) - backend_->OnEvent(Stats::GAJS_EVICTED); - } entry->Release(); return true; diff --git a/net/disk_cache/stats.cc b/net/disk_cache/stats.cc index 55d4ba8..94d096b 100644 --- a/net/disk_cache/stats.cc +++ b/net/disk_cache/stats.cc @@ -61,7 +61,7 @@ static const char* kCounterNames[] = { "Last report", "Last report timer", "Doom recent entries", - "ga.js evicted" + "unused" }; COMPILE_ASSERT(arraysize(kCounterNames) == disk_cache::Stats::MAX_COUNTER, update_the_names); @@ -113,6 +113,9 @@ bool Stats::Init(void* data, int num_bytes, Addr address) { memcpy(data_sizes_, stats->data_sizes, sizeof(data_sizes_)); memcpy(counters_, stats->counters, sizeof(counters_)); + + // Clean up old value. + SetCounter(UNUSED, 0); return true; } diff --git a/net/disk_cache/stats.h b/net/disk_cache/stats.h index c93a748..440334a 100644 --- a/net/disk_cache/stats.h +++ b/net/disk_cache/stats.h @@ -47,7 +47,7 @@ class Stats { LAST_REPORT, // Time of the last time we sent a report. LAST_REPORT_TIMER, // Timer count of the last time we sent a report. DOOM_RECENT, // The cache was partially cleared. - GAJS_EVICTED, // ga.js was evicted from the cache. + UNUSED, // Was: ga.js was evicted from the cache. MAX_COUNTER }; |