diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 18:48:56 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 18:48:56 +0000 |
commit | b8c541b9d4f8769f5a191340f479c957f9886b38 (patch) | |
tree | 05f94fd7c06d9ed1e8ccaf1d40b80c2ae269391f /net/disk_cache/rankings.cc | |
parent | 5be517218a74dc9e291fb2821e2af9f01fb47e10 (diff) | |
download | chromium_src-b8c541b9d4f8769f5a191340f479c957f9886b38.zip chromium_src-b8c541b9d4f8769f5a191340f479c957f9886b38.tar.gz chromium_src-b8c541b9d4f8769f5a191340f479c957f9886b38.tar.bz2 |
Add a few histograms to the disk cache.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@735 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/rankings.cc')
-rw-r--r-- | net/disk_cache/rankings.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/disk_cache/rankings.cc b/net/disk_cache/rankings.cc index 81b5767..42667cc 100644 --- a/net/disk_cache/rankings.cc +++ b/net/disk_cache/rankings.cc @@ -29,6 +29,7 @@ #include "net/disk_cache/rankings.h" +#include "base/histogram.h" #include "net/disk_cache/backend_impl.h" #include "net/disk_cache/entry_impl.h" #include "net/disk_cache/errors.h" @@ -203,6 +204,7 @@ void Rankings::Reset() { } bool Rankings::GetRanking(CacheRankingsBlock* rankings) { + Time start = Time::Now(); if (!rankings->address().is_initialized()) return false; @@ -233,6 +235,7 @@ bool Rankings::GetRanking(CacheRankingsBlock* rankings) { EntryImpl* cache_entry = reinterpret_cast<EntryImpl*>(rankings->Data()->pointer); rankings->SetData(cache_entry->rankings()->Data()); + UMA_HISTOGRAM_TIMES(L"DiskCache.GetRankings", Time::Now() - start); return true; } @@ -380,8 +383,10 @@ void Rankings::Remove(CacheRankingsBlock* node) { // but the net effect is just an assert on debug when attempting to remove the // entry. Otherwise we'll need reentrant transactions, which is an overkill. void Rankings::UpdateRank(CacheRankingsBlock* node, bool modified) { + Time start = Time::Now(); Remove(node); Insert(node, modified); + UMA_HISTOGRAM_TIMES(L"DiskCache.UpdateRank", Time::Now() - start); } void Rankings::CompleteTransaction() { |