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

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed)

Created:
4 years, 5 months ago by Charlie Harrison
Modified:
4 years, 4 months ago
CC:
chromium-reviews, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[page_load_metrics] Add a NavigationThrottle for richer abort metrics This patch adds a NavigationThrottle, which forwards calls to WillStartRequest to the MetricsWebContentsObserver. At this point in the navigation, the NavigationHandle has additional data (like user gesture and transition type) that is extremely useful to track abort types. With this patch, we thread the page transition type at WillStartRequest time into the PageLoadTracker, where we use it to attribute abort cause to previously aborted provisional loads. This immediately yields a dramatic improvement to the abort metrics, as suddenly the BeforeCommit variants of all UnknownNavigation abort metrics will have a reliable transition type that aborted them. A followup patch will thread the user gesture bit to generate a more accurate picture of "user initiated" aborts. TBR=jam@chromium.org BUG=627501 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/4bd8a19469434b79ff524323f44eca517e799321 Cr-Commit-Position: refs/heads/master@{#409237}

Patch Set 1 #

Patch Set 2 : Add a NavigationThrottle to help track provisional abort metrics #

Patch Set 3 : Add a NavigationThrottle to help track provisional abort metrics #

Patch Set 4 : Fix some tests and keep UNKNOWN_NAVIGATION #

Patch Set 5 : fix tests #

Patch Set 6 : Move TestNavigationManager to public API and use it #

Patch Set 7 : More browser tests #

Total comments: 12

Patch Set 8 : bmcquade@ first review #

Total comments: 12

Patch Set 9 : second round w/ bmcquade@ #

Patch Set 10 : Replace DidStartNavigation with WillStartNavigationRequest!!! #

Patch Set 11 : Add a NavigationThrottle to help track provisional abort metrics #

Total comments: 6

Patch Set 12 : bmcquade@ review, fix tests #

Patch Set 13 : fix TestNavigationManager so it doesn't block NavigationThrottles #

Patch Set 14 : Attach the throttle first so it gets all notifications before any DEFERs #

Total comments: 5

Patch Set 15 : clamy@ review #

Total comments: 5

Patch Set 16 : clamy@ review #

Patch Set 17 : Some fix ups with the move to //chrome #

Total comments: 2

Patch Set 18 : formatting and comments (trybots previous) #

Patch Set 19 : rebase on #408334 #

Total comments: 15

Patch Set 20 : nasko@ first review: added TODO and updated comment #

Patch Set 21 : Add PerFrameTestNavigationManager #

Patch Set 22 : fix new unit tests #

Total comments: 4

Patch Set 23 : nasko@ nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+512 lines, -324 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/browser/page_load_metrics/metrics_navigation_throttle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/page_load_metrics/metrics_navigation_throttle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/metrics_web_contents_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/page_load_metrics/metrics_web_contents_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 8 chunks +21 lines, -10 lines 0 comments Download
M chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +15 lines, -6 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +0 lines, -15 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -6 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +21 lines, -13 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +107 lines, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/page_load_metrics_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -4 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M components/page_load_metrics.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -70 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +6 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +6 lines, -6 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +52 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +119 lines, -0 lines 0 comments Download
M content/test/content_browser_test_utils_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +19 lines, -53 lines 0 comments Download
M content/test/content_browser_test_utils_internal.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +14 lines, -108 lines 0 comments Download
M content/test/test_web_contents.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 99 (60 generated)
Charlie Harrison
PTAL! Note: this patch adds an unfortunate side effect of making our abort unit tests ...
4 years, 5 months ago (2016-07-12 16:14:09 UTC) #4
Bryan McQuade
Nice change, thanks! I did a quick first pass and left a few questions / ...
4 years, 5 months ago (2016-07-12 16:45:29 UTC) #5
Charlie Harrison
https://codereview.chromium.org/2132603002/diff/120001/components/page_load_metrics/browser/metrics_navigation_throttle.cc File components/page_load_metrics/browser/metrics_navigation_throttle.cc (right): https://codereview.chromium.org/2132603002/diff/120001/components/page_load_metrics/browser/metrics_navigation_throttle.cc#newcode26 components/page_load_metrics/browser/metrics_navigation_throttle.cc:26: if (observer) On 2016/07/12 16:45:29, Bryan McQuade wrote: > ...
4 years, 5 months ago (2016-07-12 19:20:22 UTC) #6
Bryan McQuade
Thanks! I'm looking forward to getting this extra data so we can improve abort tracking. ...
4 years, 5 months ago (2016-07-13 18:23:36 UTC) #7
Charlie Harrison
https://codereview.chromium.org/2132603002/diff/140001/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/2132603002/diff/140001/components/page_load_metrics/browser/metrics_web_contents_observer.cc#newcode710 components/page_load_metrics/browser/metrics_web_contents_observer.cc:710: NotifyAbortedProvisionalLoadsNewNavigation(it.first->second.get()); On 2016/07/13 18:23:36, Bryan McQuade wrote: > should ...
4 years, 5 months ago (2016-07-13 18:58:19 UTC) #9
Bryan McQuade
Overall this seems great and I am really looking forward to having this additional data ...
4 years, 5 months ago (2016-07-15 15:58:48 UTC) #13
Charlie Harrison
On 2016/07/15 15:58:48, Bryan McQuade wrote: > Overall this seems great and I am really ...
4 years, 5 months ago (2016-07-15 16:00:17 UTC) #14
Charlie Harrison
This is ready for another pass. I've updated the MWCO in a significant way by ...
4 years, 5 months ago (2016-07-20 20:33:59 UTC) #21
Bryan McQuade
Thanks! I looked at the MWCO changes - those look great now. Thanks for addressing ...
4 years, 5 months ago (2016-07-20 21:51:11 UTC) #24
Bryan McQuade
Thanks! I looked at the MWCO changes - those look great now. Thanks for addressing ...
4 years, 5 months ago (2016-07-20 21:51:12 UTC) #25
Charlie Harrison
Thanks! https://codereview.chromium.org/2132603002/diff/200001/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/2132603002/diff/200001/components/page_load_metrics/browser/metrics_web_contents_observer.cc#newcode379 components/page_load_metrics/browser/metrics_web_contents_observer.cc:379: page_transition_ = navigation_handle->GetPageTransition(); On 2016/07/20 21:51:11, Bryan McQuade ...
4 years, 5 months ago (2016-07-21 14:16:16 UTC) #28
Charlie Harrison
Looks like tests are failing, investigating.
4 years, 5 months ago (2016-07-21 14:48:05 UTC) #31
Charlie Harrison
PTAL. I changed implementations to attach the metrics navigation throttle first. This means that we'll ...
4 years, 5 months ago (2016-07-22 14:16:57 UTC) #44
Charlie Harrison
bmcquade@, can you take another look?
4 years, 5 months ago (2016-07-25 23:16:31 UTC) #45
Bryan McQuade
lgtm
4 years, 4 months ago (2016-07-25 23:45:24 UTC) #46
Bryan McQuade
Thanks for this change! Really glad to have this for better abort metrics.
4 years, 4 months ago (2016-07-25 23:45:39 UTC) #47
Charlie Harrison
Thanks! clamy@ could you look at NavigationThrottle usage, and moving the TestNavigationManager to the public ...
4 years, 4 months ago (2016-07-25 23:54:22 UTC) #49
Ilya Sherman
histograms.xml lgtm, thanks =)
4 years, 4 months ago (2016-07-26 02:11:44 UTC) #50
clamy
Thanks! A few comments. @nasko: could you have a look at the public interface and ...
4 years, 4 months ago (2016-07-26 17:09:23 UTC) #52
jam
On 2016/07/25 23:54:22, csharrison wrote: > Thanks! > clamy@ could you look at NavigationThrottle usage, ...
4 years, 4 months ago (2016-07-26 17:33:48 UTC) #53
Charlie Harrison
Thanks. There seems to be some problem that I traced back to https://codereview.chromium.org/2140393002/ which hides ...
4 years, 4 months ago (2016-07-26 19:56:07 UTC) #55
Bryan McQuade
FYI: I just landed the change to move page_load_metrics out of components, so this change ...
4 years, 4 months ago (2016-07-26 23:45:12 UTC) #56
clamy
Thanks! It looks better now. I'm away for 2 weeks, so could you check with ...
4 years, 4 months ago (2016-07-27 17:02:24 UTC) #57
Charlie Harrison
nasko, PTAL! Thanks! https://codereview.chromium.org/2132603002/diff/280001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/2132603002/diff/280001/content/public/test/browser_test_utils.cc#newcode359 content/public/test/browser_test_utils.cc:359: // to the end of the ...
4 years, 4 months ago (2016-07-28 01:29:59 UTC) #64
Charlie Harrison
Removing jam, sorry for the bother!
4 years, 4 months ago (2016-07-28 13:20:31 UTC) #70
Charlie Harrison
nasko@, ping. Would you please look at the //content changes?
4 years, 4 months ago (2016-08-01 13:45:13 UTC) #71
nasko
https://codereview.chromium.org/2132603002/diff/360001/chrome/browser/page_load_metrics/metrics_navigation_throttle.h File chrome/browser/page_load_metrics/metrics_navigation_throttle.h (right): https://codereview.chromium.org/2132603002/diff/360001/chrome/browser/page_load_metrics/metrics_navigation_throttle.h#newcode18 chrome/browser/page_load_metrics/metrics_navigation_throttle.h:18: // is used to obtain more reliable abort metrics ...
4 years, 4 months ago (2016-08-01 15:29:23 UTC) #72
Charlie Harrison
Thanks Nasko! https://codereview.chromium.org/2132603002/diff/360001/chrome/browser/page_load_metrics/metrics_navigation_throttle.h File chrome/browser/page_load_metrics/metrics_navigation_throttle.h (right): https://codereview.chromium.org/2132603002/diff/360001/chrome/browser/page_load_metrics/metrics_navigation_throttle.h#newcode18 chrome/browser/page_load_metrics/metrics_navigation_throttle.h:18: // is used to obtain more reliable ...
4 years, 4 months ago (2016-08-01 17:42:19 UTC) #73
nasko
https://codereview.chromium.org/2132603002/diff/360001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2132603002/diff/360001/content/browser/frame_host/navigation_handle_impl.cc#newcode556 content/browser/frame_host/navigation_handle_impl.cc:556: RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); On 2016/08/01 17:42:19, csharrison wrote: > On 2016/08/01 ...
4 years, 4 months ago (2016-08-01 23:38:11 UTC) #74
Charlie Harrison
OK. I ended up adding a PerFrameTestNavigationManager private to content that only applies frame_tree_node_id filtering. ...
4 years, 4 months ago (2016-08-02 13:09:15 UTC) #83
nasko
LGTM with a couple of nits. https://codereview.chromium.org/2132603002/diff/420001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/2132603002/diff/420001/content/public/test/browser_test_utils.cc#newcode1628 content/public/test/browser_test_utils.cc:1628: will_start_loop_runner_->Quit(); Why would ...
4 years, 4 months ago (2016-08-02 16:22:16 UTC) #84
Charlie Harrison
Thanks, everyone! https://codereview.chromium.org/2132603002/diff/420001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/2132603002/diff/420001/content/public/test/browser_test_utils.cc#newcode1628 content/public/test/browser_test_utils.cc:1628: will_start_loop_runner_->Quit(); On 2016/08/02 16:22:16, nasko wrote: > ...
4 years, 4 months ago (2016-08-02 16:47:13 UTC) #85
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132603002/440001
4 years, 4 months ago (2016-08-02 16:48:14 UTC) #88
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/229332)
4 years, 4 months ago (2016-08-02 16:55:54 UTC) #90
Charlie Harrison
jam@ I am adding you to TBR for components/page_load_metrics.gypi as I am no longer in ...
4 years, 4 months ago (2016-08-02 17:00:28 UTC) #92
Charlie Harrison
Actually ccing jam@, who I am adding to TBR for components/page_load_metrics.gypi (I am no longer ...
4 years, 4 months ago (2016-08-02 17:01:44 UTC) #93
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132603002/440001
4 years, 4 months ago (2016-08-02 17:02:41 UTC) #95
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years, 4 months ago (2016-08-02 18:03:32 UTC) #97
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 18:05:37 UTC) #99
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/4bd8a19469434b79ff524323f44eca517e799321
Cr-Commit-Position: refs/heads/master@{#409237}

Powered by Google App Engine
This is Rietveld 408576698