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
This commit is contained in:
@@ -301,7 +301,9 @@ void SimpleIndexFile::LoadIndexEntriesInternal(
|
|||||||
const base::TimeTicks start = base::TimeTicks::Now();
|
const base::TimeTicks start = base::TimeTicks::Now();
|
||||||
index_file_entries = LoadFromDisk(index_file_path);
|
index_file_entries = LoadFromDisk(index_file_path);
|
||||||
UMA_HISTOGRAM_TIMES("SimpleCache.IndexLoadTime",
|
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);
|
UMA_HISTOGRAM_BOOLEAN("SimpleCache.IndexStale", index_stale);
|
||||||
@@ -310,8 +312,10 @@ void SimpleIndexFile::LoadIndexEntriesInternal(
|
|||||||
if (!index_file_entries) {
|
if (!index_file_entries) {
|
||||||
const base::TimeTicks start = base::TimeTicks::Now();
|
const base::TimeTicks start = base::TimeTicks::Now();
|
||||||
index_file_entries = RestoreFromDisk(index_file_path);
|
index_file_entries = RestoreFromDisk(index_file_path);
|
||||||
UMA_HISTOGRAM_TIMES("SimpleCache.IndexRestoreTime",
|
UMA_HISTOGRAM_MEDIUM_TIMES("SimpleCache.IndexRestoreTime",
|
||||||
(base::TimeTicks::Now() - start));
|
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
|
// 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.
|
// away, this might save us from having to restore again next time.
|
||||||
|
@@ -10028,6 +10028,17 @@ other types of suffix sets.
|
|||||||
<summary>The number of entries in a newly created index file.</summary>
|
<summary>The number of entries in a newly created index file.</summary>
|
||||||
</histogram>
|
</histogram>
|
||||||
|
|
||||||
|
<histogram name="SimpleCache.IndexEntriesLoaded">
|
||||||
|
<summary>Number of entries loaded from the index file on start.</summary>
|
||||||
|
</histogram>
|
||||||
|
|
||||||
|
<histogram name="SimpleCache.IndexEntriesRestored">
|
||||||
|
<summary>
|
||||||
|
Number of entries restored from disk when there was no index or the index
|
||||||
|
was corrupted.
|
||||||
|
</summary>
|
||||||
|
</histogram>
|
||||||
|
|
||||||
<histogram name="SimpleCache.IndexInitializationWaiters">
|
<histogram name="SimpleCache.IndexInitializationWaiters">
|
||||||
<summary>
|
<summary>
|
||||||
At the time of index initialization, the number of enqueued jobs awaiting
|
At the time of index initialization, the number of enqueued jobs awaiting
|
||||||
|
Reference in New Issue
Block a user