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

Unified Diff: net/disk_cache/eviction.cc

Issue 42682: Disk Cache: Second pass (and final) to allow multiple instances... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months 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 | « net/disk_cache/entry_impl.cc ('k') | net/disk_cache/histogram_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/eviction.cc
===================================================================
--- net/disk_cache/eviction.cc (revision 12629)
+++ net/disk_cache/eviction.cc (working copy)
@@ -34,14 +34,11 @@
#include "base/time.h"
#include "net/disk_cache/backend_impl.h"
#include "net/disk_cache/entry_impl.h"
+#include "net/disk_cache/histogram_macros.h"
#include "net/disk_cache/trace.h"
using base::Time;
-// HISTOGRAM_HOURS will collect time related data with a granularity of hours
-// and normal values of a few months.
-#define UMA_HISTOGRAM_HOURS UMA_HISTOGRAM_COUNTS_10000
-
namespace {
const int kCleanUpMargin = 1024 * 1024;
@@ -105,7 +102,7 @@
}
}
- UMA_HISTOGRAM_TIMES("DiskCache.TotalTrimTime", Time::Now() - start);
+ CACHE_UMA(AGE_MS, "TotalTrimTime", 0, start);
Trace("*** Trim Cache end ***");
return;
}
@@ -145,10 +142,7 @@
if (first_trim_) {
first_trim_ = false;
if (backend_->ShouldReportAgain()) {
- std::string name(StringPrintf("DiskCache.TrimAge_%d",
- header_->experiment));
- UMA_HISTOGRAM_HOURS(name.c_str(),
- (Time::Now() - entry->GetLastUsed()).InHours());
+ CACHE_UMA(AGE, "TrimAge", header_->experiment, entry->GetLastUsed());
}
if (header_->create_time && !header_->lru.filled) {
@@ -265,7 +259,7 @@
factory_.NewRunnableMethod(&Eviction::TrimDeleted, empty));
}
- UMA_HISTOGRAM_TIMES("DiskCache.TotalTrimTime", Time::Now() - start);
+ CACHE_UMA(AGE_MS, "TotalTrimTime", 0, start);
Trace("*** Trim Cache end ***");
return;
}
@@ -375,7 +369,7 @@
MessageLoop::current()->PostTask(FROM_HERE,
factory_.NewRunnableMethod(&Eviction::TrimDeleted, false));
- UMA_HISTOGRAM_TIMES("DiskCache.TotalTrimDeletedTime", Time::Now() - start);
+ CACHE_UMA(AGE_MS, "TotalTrimDeletedTime", 0, start);
Trace("*** Trim Deleted end ***");
return;
}
« no previous file with comments | « net/disk_cache/entry_impl.cc ('k') | net/disk_cache/histogram_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698