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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 57783005: Disk Cache: Exclude new caches from FilesAge histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 231691)
+++ net/disk_cache/backend_impl.cc (working copy)
@@ -1896,8 +1896,10 @@
stats_.SetCounter(Stats::DOOM_CACHE, 0);
stats_.SetCounter(Stats::DOOM_RECENT, 0);
- CACHE_UMA(AGE, "FilesAge", 0,
- Time::FromInternalValue(data_->header.create_time));
+ int age = (Time::Now() -
+ Time::FromInternalValue(data_->header.create_time)).InHours();
+ if (age)
+ CACHE_UMA(HOURS, "FilesAge", 0, age);
int64 total_hours = stats_.GetCounter(Stats::TIMER) / 120;
if (!data_->header.create_time || !data_->header.lru.filled) {
« 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