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

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

Issue 16286015: SimpleCache: more histograms watching how index is loaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index.cc
diff --git a/net/disk_cache/simple/simple_index.cc b/net/disk_cache/simple/simple_index.cc
index e65023b623003cc9b22f5d6ad4f937af53acf552..10b11082167bf37c05f5cf7e38e84c5ada8f7176 100644
--- a/net/disk_cache/simple/simple_index.cc
+++ b/net/disk_cache/simple/simple_index.cc
@@ -407,6 +407,8 @@ void SimpleIndex::InitializeInternal(
index_file_entries = SimpleIndexFile::LoadFromDisk(index_filename);
UMA_HISTOGRAM_TIMES("SimpleCache.IndexLoadTime",
(base::TimeTicks::Now() - start));
+ UMA_HISTOGRAM_COUNTS("SimpleCache.IndexEntriesLoaded",
+ index_file_entries->size());
}
UMA_HISTOGRAM_BOOLEAN("SimpleCache.IndexStale", index_stale);
@@ -415,8 +417,10 @@ void SimpleIndex::InitializeInternal(
if (!index_file_entries) {
const base::TimeTicks start = base::TimeTicks::Now();
index_file_entries = SimpleIndex::RestoreFromDisk(index_filename);
- UMA_HISTOGRAM_TIMES("SimpleCache.IndexRestoreTime",
- (base::TimeTicks::Now() - start));
+ UMA_HISTOGRAM_MEDIUM_TIMES("SimpleCache.IndexRestoreTime",
+ (base::TimeTicks::Now() - start));
jar (doing other things) 2013/06/05 18:17:54 nit: no need for redundant parens. Good macro do
pasko 2013/06/05 18:39:37 Done.
+ 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') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698