diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 21:50:39 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 21:50:39 +0000 |
commit | 1a20f10185492cd3ae50137f647f0109a9c1df35 (patch) | |
tree | cca36c7a7d4320f3b3cb6dfd10337af2b245266b | |
parent | 4418255345303cb15cfa245194f712f04adc3411 (diff) | |
download | chromium_src-1a20f10185492cd3ae50137f647f0109a9c1df35.zip chromium_src-1a20f10185492cd3ae50137f647f0109a9c1df35.tar.gz chromium_src-1a20f10185492cd3ae50137f647f0109a9c1df35.tar.bz2 |
Disk cache: Add page load time histograms for the
cache throttling experiment.
BUG=54338
TEST=none
Review URL: http://codereview.chromium.org/3420006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59731 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/render_view.cc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index d025815..1b5d9e3 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -5208,6 +5208,60 @@ void RenderView::DumpLoadHistograms() const { "PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc); } + // Histograms to determine if cache throttling has an impact on PLT. + static bool use_cache_histogram2(FieldTrialList::Find("CacheThrottle") && + !FieldTrialList::Find("CacheThrottle")->group_name().empty()); + if (use_cache_histogram2) { + UMA_HISTOGRAM_ENUMERATION( + FieldTrial::MakeName("PLT.Abandoned", "CacheThrottle"), + abandoned_page ? 1 : 0, 2); + switch (load_type) { + case NavigationState::RELOAD: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_Reload", "CacheThrottle"), + begin_to_finish_all_loads); + break; + case NavigationState::HISTORY_LOAD: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_HistoryLoad", "CacheThrottle"), + begin_to_finish_all_loads); + break; + case NavigationState::NORMAL_LOAD: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_NormalLoad", "CacheThrottle"), + begin_to_finish_all_loads); + break; + case NavigationState::LINK_LOAD_NORMAL: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_LinkLoadNormal", "CacheThrottle"), + begin_to_finish_all_loads); + break; + case NavigationState::LINK_LOAD_RELOAD: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_LinkLoadReload", "CacheThrottle"), + begin_to_finish_all_loads); + break; + case NavigationState::LINK_LOAD_CACHE_STALE_OK: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_LinkLoadStaleOk", "CacheThrottle"), + begin_to_finish_all_loads); + break; + case NavigationState::LINK_LOAD_CACHE_ONLY: + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish_LinkLoadCacheOnly", "CacheThrottle"), + begin_to_finish_all_loads); + break; + default: + break; + } + if (NavigationState::RELOAD <= load_type && + NavigationState::LINK_LOAD_CACHE_ONLY >= load_type) { + PLT_HISTOGRAM(FieldTrial::MakeName( + "PLT.BeginToFinish", "CacheThrottle"), + begin_to_finish_all_loads); + } + } + // For the SPDY field trials, we need to verify that the page loaded was // the type we requested: // if we asked for a SPDY request, we got a SPDY request |