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

Unified Diff: net/disk_cache/simple/simple_index_file.cc

Issue 16286015: SimpleCache: more histograms watching how index is loaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased on top of Randy's megapatch Created 7 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file.cc
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index d8d2a332760580b162a03c03a896cd5357a364c2..aa2979de8e1bbac31fac8bba4f2239dd85d453d8 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -301,7 +301,9 @@ void SimpleIndexFile::LoadIndexEntriesInternal(
const base::TimeTicks start = base::TimeTicks::Now();
index_file_entries = LoadFromDisk(index_file_path);
UMA_HISTOGRAM_TIMES("SimpleCache.IndexLoadTime",
- (base::TimeTicks::Now() - start));
+ base::TimeTicks::Now() - start);
+ UMA_HISTOGRAM_COUNTS("SimpleCache.IndexEntriesLoaded",
+ index_file_entries->size());
}
UMA_HISTOGRAM_BOOLEAN("SimpleCache.IndexStale", index_stale);
@@ -310,8 +312,10 @@ void SimpleIndexFile::LoadIndexEntriesInternal(
if (!index_file_entries) {
const base::TimeTicks start = base::TimeTicks::Now();
index_file_entries = RestoreFromDisk(index_file_path);
- UMA_HISTOGRAM_TIMES("SimpleCache.IndexRestoreTime",
- (base::TimeTicks::Now() - start));
+ UMA_HISTOGRAM_MEDIUM_TIMES("SimpleCache.IndexRestoreTime",
+ base::TimeTicks::Now() - start);
+ UMA_HISTOGRAM_COUNTS("SimpleCache.IndexEntriesRestored",
+ index_file_entries->size());
// When we restore from disk we write the merged index file to disk right
// away, this might save us from having to restore again next time.
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698