diff options
author | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 14:48:25 +0000 |
---|---|---|
committer | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 14:48:25 +0000 |
commit | 3d10bebc65ff04b45178004f5a386f8414aa465d (patch) | |
tree | 011e823e03e0491ba62ab9c4ba7cf2de11af5a80 /net/http | |
parent | 57ead35546411f3cb76705c0f21ef139593f5ec8 (diff) | |
download | chromium_src-3d10bebc65ff04b45178004f5a386f8414aa465d.zip chromium_src-3d10bebc65ff04b45178004f5a386f8414aa465d.tar.gz chromium_src-3d10bebc65ff04b45178004f5a386f8414aa465d.tar.bz2 |
Add a field trial for the cache WRT prefetching
Prefetching might be putting stress on the cache concurrency. This
fieldtrial explores if this is the case.
R=rvargas
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3133006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_cache_transaction.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc index bbd42f8..5632563 100644 --- a/net/http/http_cache_transaction.cc +++ b/net/http/http_cache_transaction.cc @@ -13,6 +13,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/field_trial.h" #include "base/histogram.h" #include "base/ref_counted.h" #include "base/string_util.h" @@ -830,8 +831,19 @@ int HttpCache::Transaction::DoAddToEntry() { int HttpCache::Transaction::DoAddToEntryComplete(int result) { net_log_.EndEvent(NetLog::TYPE_HTTP_CACHE_WAITING, NULL); - UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", - base::TimeTicks::Now() - entry_lock_waiting_since_); + + const base::TimeDelta entry_lock_wait = + base::TimeTicks::Now() - entry_lock_waiting_since_; + UMA_HISTOGRAM_TIMES("HttpCache.EntryLockWait", entry_lock_wait); + static const bool prefetching_fieldtrial = + FieldTrialList::Find("Prefetch") && + !FieldTrialList::Find("Prefetch")->group_name().empty(); + if (prefetching_fieldtrial) { + UMA_HISTOGRAM_TIMES( + FieldTrial::MakeName("HttpCache.EntryLockWait", "Prefetch"), + entry_lock_wait); + } + entry_lock_waiting_since_ = base::TimeTicks(); DCHECK(new_entry_); cache_pending_ = false; |