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

Unified Diff: chrome/renderer/page_load_histograms.cc

Issue 11419319: Histogram first paint PLT's for Cache Sensitivity Analysis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/page_load_histograms.cc
===================================================================
--- chrome/renderer/page_load_histograms.cc (revision 171058)
+++ chrome/renderer/page_load_histograms.cc (working copy)
@@ -244,14 +244,19 @@
PLT_HISTOGRAM("PLT.RequestToFinish", finish_all_loads - request);
}
PLT_HISTOGRAM("PLT.CommitToFinish", finish_all_loads - commit);
+
+ scoped_ptr<TimeDelta> begin_to_first_paint;
rvargas (doing something else) 2012/12/04 22:55:48 How about TimeDelta foo = TimeDelta::FromInternalV
tburkard 2012/12/04 23:09:08 I thought about both of these, and I find scoped_p
James Hawkins 2012/12/04 23:11:56 I'm fine w/ scoped_ptr. NULLness (or non-) indica
+ scoped_ptr<TimeDelta> commit_to_first_paint;
if (!first_paint.is_null()) {
// 'first_paint' can be before 'begin' for an unknown reason.
// See bug http://crbug.com/125273 for details.
if (begin <= first_paint) {
- PLT_HISTOGRAM("PLT.BeginToFirstPaint", first_paint - begin);
+ begin_to_first_paint.reset(new TimeDelta(first_paint - begin));
+ PLT_HISTOGRAM("PLT.BeginToFirstPaint", *begin_to_first_paint);
}
DCHECK(commit <= first_paint);
- PLT_HISTOGRAM("PLT.CommitToFirstPaint", first_paint - commit);
+ commit_to_first_paint.reset(new TimeDelta(first_paint - commit));
+ PLT_HISTOGRAM("PLT.CommitToFirstPaint", *commit_to_first_paint);
}
if (!first_paint_after_load.is_null()) {
// 'first_paint_after_load' can be before 'begin' for an unknown reason.
@@ -809,6 +814,16 @@
PLT_HISTOGRAM(base::FieldTrial::MakeName(
"PLT.BeginToFinish_CacheSensitivity", "CacheSensitivityAnalysis"),
begin_to_finish_all_loads);
+ if (begin_to_first_paint.get()) {
+ PLT_HISTOGRAM(base::FieldTrial::MakeName(
+ "PLT.BeginToFirstPaint_CacheSensitivity", "CacheSensitivityAnalysis"),
+ *begin_to_first_paint);
+ }
+ if (commit_to_first_paint.get()) {
+ PLT_HISTOGRAM(base::FieldTrial::MakeName(
+ "PLT.CommitToFirstPaint_CacheSensitivity", "CacheSensitivityAnalysis"),
+ *commit_to_first_paint);
+ }
}
// Since there are currently no guarantees that renderer histograms will be
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698