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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 146129: Disk Cache: Split some time histograms in groups based... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/backend_impl.h ('k') | net/disk_cache/entry_impl.h » ('j') | 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 19175)
+++ net/disk_cache/backend_impl.cc (working copy)
@@ -361,7 +361,7 @@
DCHECK(entry);
*entry = cache_entry;
- CACHE_UMA(AGE_MS, "OpenTime", 0, start);
+ CACHE_UMA(AGE_MS, "OpenTime", GetSizeGroup(), start);
stats_.OnEvent(Stats::OPEN_HIT);
return true;
}
@@ -439,7 +439,7 @@
cache_entry.swap(reinterpret_cast<EntryImpl**>(entry));
- CACHE_UMA(AGE_MS, "CreateTime", 0, start);
+ CACHE_UMA(AGE_MS, "CreateTime", GetSizeGroup(), start);
stats_.OnEvent(Stats::CREATE_HIT);
Trace("create entry hit ");
return true;
@@ -750,6 +750,17 @@
return StringPrintf("DiskCache.%d.%s_%d", cache_type_, name, experiment);
}
+int BackendImpl::GetSizeGroup() {
+ if (disabled_)
+ return 0;
+
+ // We want to report times grouped by the current cache size (50 MB groups).
+ int group = data_->header.num_bytes / (50 * 1024 * 1024);
+ if (group > 6)
+ group = 6; // Limit the number of groups, just in case.
+ return group;
+}
+
// We want to remove biases from some histograms so we only send data once per
// week.
bool BackendImpl::ShouldReportAgain() {
« no previous file with comments | « net/disk_cache/backend_impl.h ('k') | net/disk_cache/entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698