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

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

Issue 1977463002: Prerender: Remove MatchComplete status. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 7 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
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/format_macros.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 100)) 199 100))
200 200
201 // Summary of all histograms Perceived PLT histograms: 201 // Summary of all histograms Perceived PLT histograms:
202 // (all prefixed PerceivedPLT) 202 // (all prefixed PerceivedPLT)
203 // PerceivedPLT -- Perceived Pageloadtimes (PPLT) for all pages in the group. 203 // PerceivedPLT -- Perceived Pageloadtimes (PPLT) for all pages in the group.
204 // ...Windowed -- PPLT for pages in the 30s after a prerender is created. 204 // ...Windowed -- PPLT for pages in the 30s after a prerender is created.
205 // ...Matched -- A prerendered page that was swapped in. In the NoUse 205 // ...Matched -- A prerendered page that was swapped in. In the NoUse
206 // and Control group cases, while nothing ever gets swapped in, we do keep 206 // and Control group cases, while nothing ever gets swapped in, we do keep
207 // track of what would be prerendered and would be swapped in -- and those 207 // track of what would be prerendered and would be swapped in -- and those
208 // cases are what is classified as Match for these groups. 208 // cases are what is classified as Match for these groups.
209 // ...MatchedComplete -- A prerendered page that was swapped in + a few
210 // that were not swapped in so that the set of pages lines up more closely with
211 // the control group.
212 // ...FirstAfterMiss -- First page to finish loading after a prerender, which 209 // ...FirstAfterMiss -- First page to finish loading after a prerender, which
213 // is different from the page that was prerendered. 210 // is different from the page that was prerendered.
214 // ...FirstAfterMissNonOverlapping -- Same as FirstAfterMiss, but only 211 // ...FirstAfterMissNonOverlapping -- Same as FirstAfterMiss, but only
215 // triggering for the first page to finish after the prerender that also started 212 // triggering for the first page to finish after the prerender that also started
216 // after the prerender started. 213 // after the prerender started.
217 // ...FirstAfterMissBoth -- pages meeting 214 // ...FirstAfterMissBoth -- pages meeting
218 // FirstAfterMiss AND FirstAfterMissNonOverlapping 215 // FirstAfterMiss AND FirstAfterMissNonOverlapping
219 // ...FirstAfterMissAnyOnly -- pages meeting 216 // ...FirstAfterMissAnyOnly -- pages meeting
220 // FirstAfterMiss but NOT FirstAfterMissNonOverlapping 217 // FirstAfterMiss but NOT FirstAfterMissNonOverlapping
221 // ..FirstAfterMissNonOverlappingOnly -- pages meeting 218 // ..FirstAfterMissNonOverlappingOnly -- pages meeting
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 339
343 void PrerenderHistograms::RecordTimeBetweenPrerenderRequests( 340 void PrerenderHistograms::RecordTimeBetweenPrerenderRequests(
344 Origin origin, base::TimeDelta time) const { 341 Origin origin, base::TimeDelta time) const {
345 PREFIXED_HISTOGRAM( 342 PREFIXED_HISTOGRAM(
346 "TimeBetweenPrerenderRequests", origin, 343 "TimeBetweenPrerenderRequests", origin,
347 UMA_HISTOGRAM_TIMES(name, time)); 344 UMA_HISTOGRAM_TIMES(name, time));
348 } 345 }
349 346
350 void PrerenderHistograms::RecordFinalStatus( 347 void PrerenderHistograms::RecordFinalStatus(
351 Origin origin, 348 Origin origin,
352 PrerenderContents::MatchCompleteStatus mc_status,
353 FinalStatus final_status) const { 349 FinalStatus final_status) const {
354 DCHECK(final_status != FINAL_STATUS_MAX); 350 DCHECK(final_status != FINAL_STATUS_MAX);
355 351 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT(
356 if (mc_status == PrerenderContents::MATCH_COMPLETE_DEFAULT || 352 "FinalStatus", origin,
357 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACED) { 353 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX));
358 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT(
359 "FinalStatus", origin,
360 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX));
361 }
362 if (mc_status == PrerenderContents::MATCH_COMPLETE_DEFAULT ||
363 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACEMENT ||
364 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACEMENT_PENDING) {
365 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT(
366 "FinalStatusMatchComplete", origin,
367 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX));
368 }
369 } 354 }
370 355
371 void PrerenderHistograms::RecordNetworkBytes(Origin origin, 356 void PrerenderHistograms::RecordNetworkBytes(Origin origin,
372 bool used, 357 bool used,
373 int64_t prerender_bytes, 358 int64_t prerender_bytes,
374 int64_t profile_bytes) { 359 int64_t profile_bytes) {
375 const int kHistogramMin = 1; 360 const int kHistogramMin = 1;
376 const int kHistogramMax = 100000000; // 100M. 361 const int kHistogramMax = 100000000; // 100M.
377 const int kBucketCount = 50; 362 const int kBucketCount = 50;
378 363
(...skipping 21 matching lines...) Expand all
400 } 385 }
401 } 386 }
402 387
403 bool PrerenderHistograms::IsOriginWash() const { 388 bool PrerenderHistograms::IsOriginWash() const {
404 if (!WithinWindow()) 389 if (!WithinWindow())
405 return false; 390 return false;
406 return origin_wash_; 391 return origin_wash_;
407 } 392 }
408 393
409 } // namespace prerender 394 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_histograms.h ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698