Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: chrome/browser/prerender/prerender_histograms.cc

Issue 10802024: Make three simultanious prerenders the default maximum in Canary and Dev only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add an histogram Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prerender/prerender_histograms.h" 5 #include "chrome/browser/prerender/prerender_histograms.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 last_experiment_id_ = experiment; 141 last_experiment_id_ = experiment;
142 142
143 // If we observe multiple tags within the 30 second window, we will still 143 // If we observe multiple tags within the 30 second window, we will still
144 // reset the window to begin at the most recent occurrence, so that we will 144 // reset the window to begin at the most recent occurrence, so that we will
145 // always be in a window in the 30 seconds from each occurrence. 145 // always be in a window in the 30 seconds from each occurrence.
146 last_prerender_seen_time_ = GetCurrentTimeTicks(); 146 last_prerender_seen_time_ = GetCurrentTimeTicks();
147 seen_any_pageload_ = false; 147 seen_any_pageload_ = false;
148 seen_pageload_started_after_prerender_ = false; 148 seen_pageload_started_after_prerender_ = false;
149 } 149 }
150 150
151 void PrerenderHistograms::RecordPrerenderStarted(Origin origin) const { 151 void PrerenderHistograms::RecordPrerenderStarted(Origin origin,
152 size_t prerender_count) const {
153 UMA_HISTOGRAM_ENUMERATION("Prerender.PrerenderCount", prerender_count,
154 Config::kDefaultMaxConcurrency + 1);
dominich 2012/07/19 16:04:38 this will be a measure of how often we prerender 1
gavinp 2012/07/23 18:35:21 Good idea: I now only emit this if the max concurr
152 if (OriginIsOmnibox(origin)) { 155 if (OriginIsOmnibox(origin)) {
153 UMA_HISTOGRAM_COUNTS( 156 UMA_HISTOGRAM_COUNTS(
154 StringPrintf("Prerender.OmniboxPrerenderCount%s", 157 StringPrintf("Prerender.OmniboxPrerenderCount%s",
155 PrerenderManager::GetModeString()).c_str(), 158 PrerenderManager::GetModeString()).c_str(),
156 1); 159 1);
157 } 160 }
158 } 161 }
159 162
160 void PrerenderHistograms::RecordUsedPrerender(Origin origin) const { 163 void PrerenderHistograms::RecordUsedPrerender(Origin origin) const {
161 if (OriginIsOmnibox(origin)) { 164 if (OriginIsOmnibox(origin)) {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 "LocalPredictorTimeUntilUsed", 407 "LocalPredictorTimeUntilUsed",
405 UMA_HISTOGRAM_CUSTOM_TIMES( 408 UMA_HISTOGRAM_CUSTOM_TIMES(
406 name, 409 name,
407 time_until_used, 410 time_until_used,
408 base::TimeDelta::FromMilliseconds(10), 411 base::TimeDelta::FromMilliseconds(10),
409 max_age, 412 max_age,
410 50)); 413 50));
411 } 414 }
412 415
413 } // namespace prerender 416 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698