diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 14:48:50 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 14:48:50 +0000 |
commit | 11f595b2430eaa775245f7d7c24babf5a3e6fa09 (patch) | |
tree | cd9e11bf0c4d7cca402df5f98de59074c5e56e93 /chrome/renderer/page_load_histograms.cc | |
parent | a1fc0f7f9f29b20f76d85820036f8482f99eb72f (diff) | |
download | chromium_src-11f595b2430eaa775245f7d7c24babf5a3e6fa09.zip chromium_src-11f595b2430eaa775245f7d7c24babf5a3e6fa09.tar.gz chromium_src-11f595b2430eaa775245f7d7c24babf5a3e6fa09.tar.bz2 |
HTML/Javascript redirects while prerendering are no longer
recorded as cancelled prerenders in the histograms.
Also, the time recorded for the time until display of
prerendered pages takes into account the time taken by any
redirects. This makes histograms for prerendered and
non-prerendered pages even less directly comparable than
before.
BUG=78506
TEST=renderer-side histograms look a bit more like what
we're seeing via other measurements.
Review URL: http://codereview.chromium.org/6735071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/page_load_histograms.cc')
-rw-r--r-- | chrome/renderer/page_load_histograms.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc index 0a47fd0..97edd58 100644 --- a/chrome/renderer/page_load_histograms.cc +++ b/chrome/renderer/page_load_histograms.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -32,7 +32,7 @@ namespace { // Histograms to determine prerendering's impact on perceived PLT. void UpdatePrerenderHistograms(NavigationState* navigation_state, - const Time& begin, const Time& finish_all_loads, + const Time& finish_all_loads, const TimeDelta& begin_to_finish_all_loads) { // Load time for non-prerendered pages. static bool use_prerender_histogram = @@ -47,6 +47,10 @@ void UpdatePrerenderHistograms(NavigationState* navigation_state, return; } + // Do not record stats for redirected prerendered pages. + if (navigation_state->was_prerender_redirected()) + return; + // Histogram for usage rate of prerendered pages. Time prerendered_page_display = navigation_state->prerendered_page_display_time(); @@ -56,8 +60,10 @@ void UpdatePrerenderHistograms(NavigationState* navigation_state, return; // Histograms for perceived load time of prerendered pages. + Time prerendered_page_start = + navigation_state->prerendered_page_start_time(); PLT_HISTOGRAM("PLT.TimeUntilDisplay_PrerenderLoad", - prerendered_page_display - begin); + prerendered_page_display - prerendered_page_start); TimeDelta perceived_load_time = finish_all_loads - prerendered_page_display; if (perceived_load_time < TimeDelta::FromSeconds(0)) { PLT_HISTOGRAM("PLT.PrerenderIdleTime_PrerenderLoad", -perceived_load_time); @@ -313,7 +319,7 @@ void PageLoadHistograms::Dump(WebFrame* frame) { break; } - UpdatePrerenderHistograms(navigation_state, begin, finish_all_loads, + UpdatePrerenderHistograms(navigation_state, finish_all_loads, begin_to_finish_all_loads); // Histograms to determine if DNS prefetching has an impact on PLT. |