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

Issue 1449253002: [do not review][page_load_metrics] User Initiated Abort Tracking (Closed)

Created:
5 years, 1 month ago by Charlie Harrison
Modified:
5 years ago
Reviewers:
Bryan McQuade
CC:
chromium-reviews, droger+watchlist_chromium.org, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, loading-reviews+metrics_chromium.org, csharrison+watch_chromium.org, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@plm_navigation_start
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[page_load_metrics] User Initiated Abort Tracking Brief implementation design document here: https://docs.google.com/document/d/110xLqjh9pRBfUevRZYgJevyBoq36uulzkUvTYhDveR4/edit# BUG=517209

Patch Set 1 #

Total comments: 19

Patch Set 2 : Bryan partial review #

Patch Set 3 : Add 100ms condition to overriding ABORT_OTHER. Remove ABORT_OTHER for committed loads #

Total comments: 17
Unified diffs Side-by-side diffs Delta from patch set Stats (+392 lines, -9 lines) Patch
M components/page_load_metrics/browser/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/page_load_metrics/browser/metrics_web_contents_observer.h View 1 2 9 chunks +84 lines, -2 lines 6 comments Download
M components/page_load_metrics/browser/metrics_web_contents_observer.cc View 1 2 12 chunks +134 lines, -7 lines 11 comments Download
M components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc View 1 1 chunk +54 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 2 chunks +119 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 9 (2 generated)
Charlie Harrison
PTAL. Not in scope: adding this to observers. I'll add more tests when you sign ...
5 years, 1 month ago (2015-11-17 01:33:37 UTC) #2
Bryan McQuade
Thanks, this looks really good! My only concern is around having to keep track of ...
5 years, 1 month ago (2015-11-17 13:33:08 UTC) #3
Charlie Harrison
Address most of the comments except aborted_provisional_load_. Thanks for the review. https://codereview.chromium.org/1449253002/diff/1/components/page_load_metrics/browser/metrics_web_contents_observer.cc File components/page_load_metrics/browser/metrics_web_contents_observer.cc (right): ...
5 years, 1 month ago (2015-11-17 16:11:55 UTC) #4
Charlie Harrison
Updated per discussion about adding a 100ms delay check on overriding abort causes. This new ...
5 years, 1 month ago (2015-11-17 22:53:29 UTC) #5
Bryan McQuade
Some thoughts specifically on metric naming. I'll look at the implementation next. https://codereview.chromium.org/1449253002/diff/40001/components/page_load_metrics/browser/metrics_web_contents_observer.cc File components/page_load_metrics/browser/metrics_web_contents_observer.cc ...
5 years, 1 month ago (2015-11-23 21:33:43 UTC) #6
Bryan McQuade
looks good overall. initial comments. will finish tomorrow. https://codereview.chromium.org/1449253002/diff/40001/components/page_load_metrics/browser/metrics_web_contents_observer.cc File components/page_load_metrics/browser/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/1449253002/diff/40001/components/page_load_metrics/browser/metrics_web_contents_observer.cc#newcode86 components/page_load_metrics/browser/metrics_web_contents_observer.cc:86: if ...
5 years, 1 month ago (2015-11-23 22:39:44 UTC) #7
Charlie Harrison
5 years ago (2015-11-25 20:15:25 UTC) #8
I'm going to transition to using the new observer system, fwiw.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
File components/page_load_metrics/browser/metrics_web_contents_observer.cc
(right):

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.cc:86: if
(ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_RELOAD))
On 2015/11/23 22:39:44, Bryan McQuade wrote:
> any reason we use PageTransitionCoreTypeIs here but not in the 'else if'
below?

PAGE_TRANSITION_FORWARD_BACK is a qualifier, not a core type.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.cc:221: //
methods.
On 2015/11/23 22:39:44, Bryan McQuade wrote:
> Let's link to your design doc here so people reading the code can get more
> insight on why the 100ms threshold is the best overall option, given the
> complexity tradeoffs.

Done.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.cc:225:
abort_time_ = std::min(abort_time_, timestamp);
On 2015/11/23 22:39:44, Bryan McQuade wrote:
> do we ever expect timestamp to be less than abort_time_? on first glance that
> seems like it should never happen. if you don't expect it, i'd rather do:
> 
> DCHECK_LE(abort_time_, timestamp);
> abort_time_ = timestamp;

I think it is possible. For instance if we get an ABORT_OTHER which gets
replaced by a navigation start. We always want the earliest value.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.cc:253: }
On 2015/11/23 21:33:42, Bryan McQuade wrote:
> can we add:
> else {
> DLOG(FATAL) << "Received ABORT_OTHER for committed load.";
> }

Done.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.cc:537: if
(event != PROVISIONAL_LOAD_ERR_FAILED_NON_ABORT) {
On 2015/11/23 22:39:44, Bryan McQuade wrote:
> if event == PROVISIONAL_LOAD_STOPPED, should we pass ABORT_STOP to
NotifyAbort?
> or does PROVISIONAL_LOAD_STOPPED have a slightly different meaning than the
STOP
> in ABORT_STOP (in which case is there a better name we should use instead of
> PROVISIONAL_LOAD_STOPPED)?

I think it should represent stop, but I'm not fully sure. Right now they
supposedly should not be occuring but we're still seeing some samples. I think
best to be safe for now and we can continue investigating.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
File components/page_load_metrics/browser/metrics_web_contents_observer.h
(right):

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.h:81:
"PageLoad.Timing2.Abort.Provisional.ForwardBackBeforePaint";
On 2015/11/23 21:33:43, Bryan McQuade wrote:
> nit: ForwardBack -> ForwardBackNavigation (even though it's slightly longer)

Done.

https://codereview.chromium.org/1449253002/diff/40001/components/page_load_me...
components/page_load_metrics/browser/metrics_web_contents_observer.h:92: const
char kHistogramProvisionalAbortBackground[] =
On 2015/11/23 21:33:42, Bryan McQuade wrote:
> looks like we aren't logging this anymore, but it does still seem like a
useful
> metric. wdyt about logging this as
> PageLoad.Timing2.NavigationToFirstBackground.BeforeCommit? This makes for an
> additional case where we can use the .BeforeCommit suffix to log metrics for
> provisional loads, in addition to the proposal for aborts above. note that any
> load before commit is also before first paint, so .BeforeCommit implies before
> paint as well.

Yeah we can log this. I convinced myself it's useful.

Powered by Google App Engine
This is Rietveld 408576698