From 9b67a3bafdcf549a9a28f4a0ce63dc165a34b6cd Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Thu, 30 Apr 2009 20:29:31 +0000 Subject: Fix a few broken histograms. Review URL: http://codereview.chromium.org/99214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14984 0039d316-1c4b-4281-b951-d872f2087c98 --- net/disk_cache/backend_impl.cc | 16 +++++++--------- net/disk_cache/eviction.cc | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'net/disk_cache') diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 51bc948..0a70169 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -780,13 +780,11 @@ void BackendImpl::FirstEviction() { if (data_->header.experiment == 8) { CACHE_UMA(PERCENTAGE, "FirstResurrectRatio", 8, stats_.GetResurrectRatio()); CACHE_UMA(PERCENTAGE, "FirstNoUseRatio", 8, - data_->header.lru.sizes[0] / data_->header.num_entries); + data_->header.lru.sizes[0] * 100 / data_->header.num_entries); CACHE_UMA(PERCENTAGE, "FirstLowUseRatio", 8, - data_->header.lru.sizes[1] / data_->header.num_entries); + data_->header.lru.sizes[1] * 100 / data_->header.num_entries); CACHE_UMA(PERCENTAGE, "FirstHighUseRatio", 8, - data_->header.lru.sizes[2] / data_->header.num_entries); - CACHE_UMA(PERCENTAGE, "FirstDeletedRatio", 8, - data_->header.lru.sizes[4] / data_->header.num_entries); + data_->header.lru.sizes[2] * 100 / data_->header.num_entries); } stats_.ResetRatios(); @@ -1382,13 +1380,13 @@ void BackendImpl::ReportStats() { CACHE_UMA(PERCENTAGE, "ResurrectRatio", data_->header.experiment, stats_.GetResurrectRatio()); CACHE_UMA(PERCENTAGE, "NoUseRatio", data_->header.experiment, - data_->header.lru.sizes[0] / data_->header.num_entries); + data_->header.lru.sizes[0] * 100 / data_->header.num_entries); CACHE_UMA(PERCENTAGE, "LowUseRatio", data_->header.experiment, - data_->header.lru.sizes[1] / data_->header.num_entries); + data_->header.lru.sizes[1] * 100 / data_->header.num_entries); CACHE_UMA(PERCENTAGE, "HighUseRatio", data_->header.experiment, - data_->header.lru.sizes[2] / data_->header.num_entries); + data_->header.lru.sizes[2] * 100 / data_->header.num_entries); CACHE_UMA(PERCENTAGE, "DeletedRatio", data_->header.experiment, - data_->header.lru.sizes[4] / data_->header.num_entries); + data_->header.lru.sizes[4] * 100 / data_->header.num_entries); } stats_.ResetRatios(); diff --git a/net/disk_cache/eviction.cc b/net/disk_cache/eviction.cc index b13361f..dab707d 100644 --- a/net/disk_cache/eviction.cc +++ b/net/disk_cache/eviction.cc @@ -437,7 +437,7 @@ void Eviction::ReportListStats() { CACHE_UMA(AGE, "HighUseAge", header_->experiment, Time::FromInternalValue(last3.get()->Data()->last_used)); if (last4.get()) - CACHE_UMA(AGE, "DeletedUseAge", header_->experiment, + CACHE_UMA(AGE, "DeletedAge", header_->experiment, Time::FromInternalValue(last4.get()->Data()->last_used)); } -- cgit v1.1