Record UKM on when resource loading was actually blocked due to intervention |
||||
Issue descriptionWhen resource loading hints intervention is enabled, we record PreviewsType field in UKM as ResourceLoadingHints if at the time of commit, Chromium decided to use resource loading hints intervention. https://cs.chromium.org/chromium/src/chrome/browser/page_load_metrics/observers/previews_ukm_observer.cc?rcl=7a96695b9c008021585e8f1f80525cd31b5c6431&l=64 However, this by itself does not indicate: (i) If loading of resources was actually blocked in Blink? (ii) What was the loading priority of resources that were blocked? These two pieces of information are important to better understand the performance impact of the experiment. Adding these bits of information to UKM would require a mojo call from renderer to the browser. https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/anchor_element_metrics_sender.h is probably one example of how we can do this.
,
Oct 2
Jered: You want to take on this one? First, we would need to get the metrics from the renderer to the browser using mojo. Next step would be to record them in UKM.
,
Oct 2
Yea, this seems like a good one for me to own.
,
Oct 2
,
Oct 22
I recently found out that it's possible to record UKM in blink directly. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/document.h?rcl=916d7bb2511ccbc00d36151590f0b002dba485ec&l=1444. So, it's possible that there might not be a need to do the mojo call.
,
Oct 22
Awesome. Thanks for that info.
,
Nov 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01 commit 2d41c88a611a40c92bb4d1dc1dab0804db4aaf01 Author: Jered Gray <jegray@google.com> Date: Fri Nov 02 20:11:11 2018 Add UKM event for PreviewsResourceLoadingHints A new UKM event, PreviewsResourceLoadingHints, is being added. This tracks the usage of the patterns associated with a resource loading hints based preview and the total number of resource requests blocked at each resource load priority. The UKM is recorded after the URL's document finished loading and uses the NavigationID from the browser's NavigationHandle as the source id. Bug: 891453, 884815 Change-Id: I429a6ef5e6222d7f569c8d2eb5539d815af6ff02 Reviewed-on: https://chromium-review.googlesource.com/c/1307057 Commit-Queue: Jered Gray <jegray@chromium.org> Reviewed-by: Steven Holte <holte@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#605034} [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.cc [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/public/mojom/loader/previews_resource_loading_hints.mojom [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/renderer/core/DEPS [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/renderer/core/dom/document.cc [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/renderer/core/loader/previews_resource_loading_hints.cc [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/renderer/core/loader/previews_resource_loading_hints.h [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/renderer/core/loader/previews_resource_loading_hints_receiver_impl.cc [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/third_party/blink/renderer/core/loader/previews_resource_loading_hints_test.cc [modify] https://crrev.com/2d41c88a611a40c92bb4d1dc1dab0804db4aaf01/tools/metrics/ukm/ukm.xml
,
Nov 5
Issue 887662 has been merged into this issue.
,
Nov 5
|
||||
►
Sign in to add a comment |
||||
Comment 1 by tbansal@chromium.org
, Oct 2