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

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: remediation to review, rebase on top of field trial change Created 8 years, 4 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/format_macros.h"
9 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
11 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
12 #include "chrome/browser/predictors/autocomplete_action_predictor.h" 13 #include "chrome/browser/predictors/autocomplete_action_predictor.h"
13 #include "chrome/browser/prerender/prerender_field_trial.h" 14 #include "chrome/browser/prerender/prerender_field_trial.h"
14 #include "chrome/browser/prerender/prerender_manager.h" 15 #include "chrome/browser/prerender/prerender_manager.h"
15 #include "chrome/browser/prerender/prerender_util.h" 16 #include "chrome/browser/prerender/prerender_util.h"
16 17
17 using predictors::AutocompleteActionPredictor; 18 using predictors::AutocompleteActionPredictor;
18 19
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 151
151 void PrerenderHistograms::RecordPrerenderStarted(Origin origin) const { 152 void PrerenderHistograms::RecordPrerenderStarted(Origin origin) const {
152 if (OriginIsOmnibox(origin)) { 153 if (OriginIsOmnibox(origin)) {
153 UMA_HISTOGRAM_COUNTS( 154 UMA_HISTOGRAM_COUNTS(
154 StringPrintf("Prerender.OmniboxPrerenderCount%s", 155 StringPrintf("Prerender.OmniboxPrerenderCount%s",
155 PrerenderManager::GetModeString()).c_str(), 156 PrerenderManager::GetModeString()).c_str(),
156 1); 157 1);
157 } 158 }
158 } 159 }
159 160
161 void PrerenderHistograms::RecordConcurrency(size_t prerender_count) const {
162 const size_t max_concurrency = PrerenderManager::GetMaxConcurrency();
163 if (max_concurrency > 1) {
164 UMA_HISTOGRAM_ENUMERATION(
165 StringPrintf("Prerender.PrerenderCountOf%" PRIuS "Max",
166 max_concurrency),
167 prerender_count, Config::kMaximumMaxConcurrency + 1);
168 }
169 }
170
171
160 void PrerenderHistograms::RecordUsedPrerender(Origin origin) const { 172 void PrerenderHistograms::RecordUsedPrerender(Origin origin) const {
161 if (OriginIsOmnibox(origin)) { 173 if (OriginIsOmnibox(origin)) {
162 UMA_HISTOGRAM_COUNTS( 174 UMA_HISTOGRAM_COUNTS(
163 StringPrintf("Prerender.OmniboxNavigationsUsedPrerenderCount%s", 175 StringPrintf("Prerender.OmniboxNavigationsUsedPrerenderCount%s",
164 PrerenderManager::GetModeString()).c_str(), 176 PrerenderManager::GetModeString()).c_str(),
165 1); 177 1);
166 } 178 }
167 } 179 }
168 180
169 void PrerenderHistograms::RecordTimeSinceLastRecentVisit( 181 void PrerenderHistograms::RecordTimeSinceLastRecentVisit(
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 "LocalPredictorTimeUntilUsed", 416 "LocalPredictorTimeUntilUsed",
405 UMA_HISTOGRAM_CUSTOM_TIMES( 417 UMA_HISTOGRAM_CUSTOM_TIMES(
406 name, 418 name,
407 time_until_used, 419 time_until_used,
408 base::TimeDelta::FromMilliseconds(10), 420 base::TimeDelta::FromMilliseconds(10),
409 max_age, 421 max_age,
410 50)); 422 50));
411 } 423 }
412 424
413 } // namespace prerender 425 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698