summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorpasko@chromium.org <pasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 22:05:41 +0000
committerpasko@chromium.org <pasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 22:05:41 +0000
commitaeb2d4fe72ccead173634a67b24aabee4911e0cc (patch)
tree3a4d615e11ce43ad60dcdaf493e939540aa151b7 /net/disk_cache
parent219b252eac6b62cad7c1e86ec025e3eaf45adeed (diff)
downloadchromium_src-aeb2d4fe72ccead173634a67b24aabee4911e0cc.zip
chromium_src-aeb2d4fe72ccead173634a67b24aabee4911e0cc.tar.gz
chromium_src-aeb2d4fe72ccead173634a67b24aabee4911e0cc.tar.bz2
SimpleCache: more histograms watching how index is loaded.
The index is stale in about 50% of cases and often takes longer than 10s to restore. We need to watch this closer: looking at sizes of the cache on load, speculating on per-entry overhead for loading. BUG=none Review URL: https://chromiumcodereview.appspot.com/16286015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/simple/simple_index_file.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index d8d2a33..aa2979d 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.