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

Issue 2903693004: Make PageLoadMetricsWaiter more resilient (Closed)

Created:
3 years, 7 months ago by Bryan McQuade
Modified:
3 years, 7 months ago
Reviewers:
Charlie Harrison
CC:
chromium-reviews, csharrison+watch_chromium.org, loading-reviews+metrics_chromium.org, speed-metrics-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make PageLoadMetricsWaiter more resilient Our current test infrastructure exposes timing update callbacks at a layer just above the IPC processing layer, in MetricsWebContentsObserver via the TestingObserver interface. This works fine when timing updates are dispatched synchronously to PageLoadMetricsObservers as part of the IPC processing flow. However, this strategy no longer works if updates are buffered before being dispatched. We may buffer updates in the browser process to allow for correct processing of out of order inter frame timing updates. This would require observing callbacks at a higher level than the MWCO timing update processing flow. The simplest way to address this is to allow the test infrastructure to inject a PageLoadMetricsObserver that can be used to wait for timing updates. This guarantees that our waiting logic is waiting on the same logic as other observers, which makes the tests more resilient. In addition, we can restrict waiting to a single page load - there have been some subtle browsertest bugs in the past where waiters waiting on a timing from one page load incorrectly stopped waiting too early because a previous page load dispatched a matching timing update. By observing at the PLMO level, and only starting waiting once a load commits, we have a page load level view of updates and can more precisely guarantee we are waiting on the right page load's updates. BUG=725998 Review-Url: https://codereview.chromium.org/2903693004 Cr-Commit-Position: refs/heads/master@{#474996} Committed: https://chromium.googlesource.com/chromium/src/+/ab243857c7a70b2c42c521896c588f01ac2eae46

Patch Set 1 #

Patch Set 2 : simplify test #

Patch Set 3 : test cleanup #

Patch Set 4 : test cleanup #

Patch Set 5 : rebase #

Patch Set 6 : simplify #

Patch Set 7 : fix comment #

Patch Set 8 : fix comment #

Patch Set 9 : rebase #

Total comments: 18

Patch Set 10 : address comments #

Patch Set 11 : rebase #

Patch Set 12 : fix compile #

Patch Set 13 : fix compile #

Messages

Total messages: 58 (48 generated)
Bryan McQuade
PTAL, thanks! This builds on pending change https://codereview.chromium.org/2904533002 to improve the resiliency of the PageLoadMetricsWaiter. ...
3 years, 7 months ago (2017-05-24 18:05:47 UTC) #12
Charlie Harrison
LGTM % comments https://codereview.chromium.org/2903693004/diff/160001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/2903693004/diff/160001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode436 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:436: for (auto& observer : testing_observers_) nit: ...
3 years, 7 months ago (2017-05-25 19:35:34 UTC) #29
Bryan McQuade
Thanks! Addressed comments. https://codereview.chromium.org/2903693004/diff/160001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/2903693004/diff/160001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode436 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:436: for (auto& observer : testing_observers_) On ...
3 years, 7 months ago (2017-05-25 19:54:06 UTC) #31
Charlie Harrison
LGTM https://codereview.chromium.org/2903693004/diff/160001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/2903693004/diff/160001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode436 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:436: for (auto& observer : testing_observers_) On 2017/05/25 19:54:05, ...
3 years, 7 months ago (2017-05-25 19:59:44 UTC) #33
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/2903693004/180001
3 years, 7 months ago (2017-05-26 01:35:08 UTC) #37
commit-bot: I haz the power
Failed to apply patch for chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc: While running git apply --index -3 -p1; error: patch ...
3 years, 7 months ago (2017-05-26 03:23:38 UTC) #39
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/2903693004/200001
3 years, 7 months ago (2017-05-26 03:30:00 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/465327)
3 years, 7 months ago (2017-05-26 03:42:37 UTC) #44
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/2903693004/240001
3 years, 7 months ago (2017-05-26 13:36:16 UTC) #55
commit-bot: I haz the power
3 years, 7 months ago (2017-05-26 13:40:27 UTC) #58
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/ab243857c7a70b2c42c521896c58...

Powered by Google App Engine
This is Rietveld 408576698