summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/backend_impl.cc16
-rw-r--r--net/disk_cache/eviction.cc2
2 files changed, 8 insertions, 10 deletions
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));
}