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

Issue 2218583002: [page_load_metrics] Log cache warmth ratios at parse stop (Closed)

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

Description

[page_load_metrics] Log cache warmth ratios at parse stop This patch instruments ChromeResourceDispatcherHostDelegate to forward request information upon request completion to page_load_metrics. This data is then associated with the current committed navigation, and used to generate histograms of % cache warmth in terms of total requests. This is only an estimate, as the actual event in browser process where we log parse stop can be up to a second after the true parse stop. In any case, it is still useful data. If we think it is necessary, we can eagerly send the parse stop IPC to the browser process in a follow up. Note: This CL also coalesces short events posted to the UI thread to avoid spamming the task queue on request complete. BUG=634120 Committed: https://crrev.com/b707384c5790eb863ce0388e0492f9a4bb5aa5e6 Cr-Commit-Position: refs/heads/master@{#410881}

Patch Set 1 #

Patch Set 2 : add histograms (trybots prev) #

Total comments: 7

Patch Set 3 : remove byte level data #

Total comments: 6

Patch Set 4 : kinuko review #

Total comments: 4

Patch Set 5 : thestig@ review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -33 lines) Patch
M chrome/browser/page_load_metrics/metrics_web_contents_observer.h View 1 2 3 4 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/metrics_web_contents_observer.cc View 1 2 3 4 chunks +27 lines, -1 line 0 comments Download
M chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc View 1 2 3 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/page_load_metrics_observer.h View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/page_load_metrics_observer.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 chunks +46 lines, -32 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (22 generated)
Charlie Harrison
kinuko@, do you have time to take a look at this? My thinking is that ...
4 years, 4 months ago (2016-08-04 21:48:55 UTC) #6
kinuko
The idea sounds good but I'm a bit concerned about the approach, I'm not sure ...
4 years, 4 months ago (2016-08-05 15:05:27 UTC) #8
Charlie Harrison
On 2016/08/05 15:05:27, kinuko wrote: > The idea sounds good but I'm a bit concerned ...
4 years, 4 months ago (2016-08-05 15:07:47 UTC) #9
Bryan McQuade
We also track time the parser is blocked on script load. Could potentially use ratio ...
4 years, 4 months ago (2016-08-05 15:14:30 UTC) #10
Charlie Harrison
True, but I still think a holistic approach that also counts images/css/etc is also important. ...
4 years, 4 months ago (2016-08-05 15:31:11 UTC) #11
Bryan McQuade
On 2016/08/05 at 15:31:11, csharrison wrote: > True, but I still think a holistic approach ...
4 years, 4 months ago (2016-08-05 15:34:06 UTC) #12
Charlie Harrison
On 2016/08/05 15:34:06, Bryan McQuade wrote: > On 2016/08/05 at 15:31:11, csharrison wrote: > > ...
4 years, 4 months ago (2016-08-05 15:44:34 UTC) #13
Bryan McQuade
I don't recall how/whether FMP takes image loads into account... I need to read more ...
4 years, 4 months ago (2016-08-05 15:58:08 UTC) #14
Charlie Harrison
At least many image loads will cause re-layouts right? That will affect FMP for sure.
4 years, 4 months ago (2016-08-05 16:21:53 UTC) #15
Charlie Harrison
kinuko@ would you like me to remove the byte ratio metric? Are you okay with ...
4 years, 4 months ago (2016-08-08 13:59:44 UTC) #16
Bryan McQuade
https://codereview.chromium.org/2218583002/diff/20001/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/2218583002/diff/20001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode763 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:763: int64_t bytes = was_cached ? raw_body_bytes : total_received_bytes; is ...
4 years, 4 months ago (2016-08-08 18:53:29 UTC) #17
Charlie Harrison
Thanks Bryan! Don't feel obliged to review this I know you're OOO. https://codereview.chromium.org/2218583002/diff/20001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc ...
4 years, 4 months ago (2016-08-08 20:55:05 UTC) #20
kinuko
So we're dropping bytes data for now? Could you update the issue description as well? ...
4 years, 4 months ago (2016-08-09 12:40:37 UTC) #23
Charlie Harrison
Thanks for the review! https://codereview.chromium.org/2218583002/diff/40001/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/2218583002/diff/40001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode749 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:749: // For simplicity, only count ...
4 years, 4 months ago (2016-08-09 13:15:44 UTC) #28
kinuko
The code change lgtm, for the validity of the metrics let's keep watching what it'd ...
4 years, 4 months ago (2016-08-09 14:06:18 UTC) #29
Charlie Harrison
Thanks, agreed. I did some manual testing with devtools and things lined up pretty well, ...
4 years, 4 months ago (2016-08-09 14:08:21 UTC) #31
Charlie Harrison
Actually +holte for histograms.xml
4 years, 4 months ago (2016-08-09 14:08:47 UTC) #33
Lei Zhang
somewhat-rubberstampish lgtm https://codereview.chromium.org/2218583002/diff/60001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2218583002/diff/60001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode283 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:283: // This function is called in RequestComplete ...
4 years, 4 months ago (2016-08-09 19:14:17 UTC) #36
Charlie Harrison
Thank you :) https://codereview.chromium.org/2218583002/diff/60001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2218583002/diff/60001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode283 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:283: // This function is called in ...
4 years, 4 months ago (2016-08-09 19:32:49 UTC) #37
Steven Holte
histograms lgtm
4 years, 4 months ago (2016-08-09 22:21:42 UTC) #38
Charlie Harrison
Thanks!
4 years, 4 months ago (2016-08-09 22:23:57 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/2218583002/80001
4 years, 4 months ago (2016-08-09 22:27:51 UTC) #42
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-09 23:57:47 UTC) #44
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 23:59:12 UTC) #46
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/b707384c5790eb863ce0388e0492f9a4bb5aa5e6
Cr-Commit-Position: refs/heads/master@{#410881}

Powered by Google App Engine
This is Rietveld 408576698