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

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

Issue 9270018: Make a separate histogram for MatchComplete Final Status'es and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 PREFIXED_HISTOGRAM( \ 162 PREFIXED_HISTOGRAM( \
163 base::FieldTrial::MakeName(tag, "Prerender"), \ 163 base::FieldTrial::MakeName(tag, "Prerender"), \
164 UMA_HISTOGRAM_CUSTOM_TIMES( \ 164 UMA_HISTOGRAM_CUSTOM_TIMES( \
165 name, \ 165 name, \
166 perceived_page_load_time, \ 166 perceived_page_load_time, \
167 base::TimeDelta::FromMilliseconds(10), \ 167 base::TimeDelta::FromMilliseconds(10), \
168 base::TimeDelta::FromSeconds(60), \ 168 base::TimeDelta::FromSeconds(60), \
169 100)); \ 169 100)); \
170 } 170 }
171 171
172 // Summary of all histograms Perceived PLT histograms:
173 // (all suffix PerceivedPLT)
dominich 2012/01/20 22:23:37 itym prefix
174 // PerceivedPLT -- Perceived Pageloadtimes (PPLT) for all pages in the group.
175 // ...Windowed -- PPLT for pages in the 30s after a prerender.
176 // ...Matched -- A prerendered page that was swapped in.
177 // ...MatchedComplete -- A prerendered page that was swapped in + a few
178 // that were not swapped in so that the set of pages lines up more closely with
dominich 2012/01/20 22:23:37 what few that were not swapped in are included? Wh
tburkard 2012/01/20 23:23:00 Coalescing histograms is unrelated to this change
179 // the control group.
180 // ...FirstAfterMiss -- First page to finish loading after a prerender, which
dominich 2012/01/20 22:23:37 I can see that these might be useful, but when we
tburkard 2012/01/20 23:23:00 Coalescing histograms is unrelated to this change
181 // is different from the page that was prerendered.
182 // ...FirstAfterMissNonOverlapping -- Same as FirstAfterMiss, but only
183 // triggering for the first page to finish after the prerender that also started
184 // after the prerender started.
185 // ...FirstAfterMissBoth -- pages meeting
186 // FirstAfterMiss AND FirstAfterMissNonOverlapping
187 // ...FirstAfterMissAnyOnly -- pages meeting
188 // FirstAfterMiss but NOT FirstAfterMissNonOverlapping
189 // ..FirstAfterMissNonOverlappingOnly -- pages meeting
190 // FirstAfterMissNonOverlapping but NOT FirstAfterMiss
dominich 2012/01/20 22:23:37 Can these be compared between Control, Experiment,
tburkard 2012/01/20 23:23:00 Yes, they appear in all variants, which is implied
191
172 void PrerenderHistograms::RecordPerceivedPageLoadTime( 192 void PrerenderHistograms::RecordPerceivedPageLoadTime(
173 base::TimeDelta perceived_page_load_time, bool was_prerender, 193 base::TimeDelta perceived_page_load_time, bool was_prerender,
174 bool was_complete_prerender, const GURL& url) { 194 bool was_complete_prerender, const GURL& url) {
175 if (!IsWebURL(url)) 195 if (!IsWebURL(url))
176 return; 196 return;
177 bool within_window = WithinWindow(); 197 bool within_window = WithinWindow();
178 bool is_google_url = IsGoogleDomain(url); 198 bool is_google_url = IsGoogleDomain(url);
179 RECORD_PLT("PerceivedPLT", perceived_page_load_time); 199 RECORD_PLT("PerceivedPLT", perceived_page_load_time);
180 if (within_window) 200 if (within_window)
181 RECORD_PLT("PerceivedPLTWindowed", perceived_page_load_time); 201 RECORD_PLT("PerceivedPLTWindowed", perceived_page_load_time);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void PrerenderHistograms::RecordFinalStatus(Origin origin, 279 void PrerenderHistograms::RecordFinalStatus(Origin origin,
260 uint8 experiment_id, 280 uint8 experiment_id,
261 FinalStatus final_status) const { 281 FinalStatus final_status) const {
262 DCHECK(final_status != FINAL_STATUS_MAX); 282 DCHECK(final_status != FINAL_STATUS_MAX);
263 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT( 283 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT(
264 base::FieldTrial::MakeName("FinalStatus", "Prerender"), 284 base::FieldTrial::MakeName("FinalStatus", "Prerender"),
265 origin, experiment_id, 285 origin, experiment_id,
266 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX)); 286 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX));
267 } 287 }
268 288
289 void PrerenderHistograms::RecordMatchCompleteFinalStatus(
dominich 2012/01/20 22:23:37 nit: If the histogram is FinalStatusMatchComplete
tburkard 2012/01/20 23:23:00 Done.
290 Origin origin,
291 uint8 experiment_id,
292 FinalStatus final_status) const {
293 DCHECK(final_status != FINAL_STATUS_MAX);
294 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT(
295 base::FieldTrial::MakeName("FinalStatusMatchComplete", "Prerender"),
296 origin, experiment_id,
297 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX));
298 }
299
269 uint8 PrerenderHistograms::GetCurrentExperimentId() const { 300 uint8 PrerenderHistograms::GetCurrentExperimentId() const {
270 if (!WithinWindow()) 301 if (!WithinWindow())
271 return kNoExperiment; 302 return kNoExperiment;
272 return last_experiment_id_; 303 return last_experiment_id_;
273 } 304 }
274 305
275 Origin PrerenderHistograms::GetCurrentOrigin() const { 306 Origin PrerenderHistograms::GetCurrentOrigin() const {
276 if (!WithinWindow()) 307 if (!WithinWindow())
277 return ORIGIN_LINK_REL_PRERENDER; 308 return ORIGIN_LINK_REL_PRERENDER;
278 return last_origin_; 309 return last_origin_;
279 } 310 }
280 311
281 bool PrerenderHistograms::IsOriginExperimentWash() const { 312 bool PrerenderHistograms::IsOriginExperimentWash() const {
282 if (!WithinWindow()) 313 if (!WithinWindow())
283 return false; 314 return false;
284 return origin_experiment_wash_; 315 return origin_experiment_wash_;
285 } 316 }
286 317
287 } // namespace prerender 318 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698