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

Issue 2581043003: Add page-level aggregation of SubresourceFilter time metrics. (Closed)

Created:
4 years ago by pkalinnikov
Modified:
3 years, 11 months ago
Reviewers:
palmer, engedy, Ilya Sherman
CC:
asvitkine+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add page-level aggregation of SubresourceFilter time metrics. Add a new message (SubresourceFilterHostMsg_DocumentLoadStatistics) that is sent to a RenderFrameHost in the browser when a document load is finished, just before the DidFinishLoad message, if performance measurements were enabled for the load. Contains the total time spent on evaluating subresource loads in DocumentSubresourceFilter::allowLoad() for a frame. Measurements are aggregated in SubresourceFilterDriverFactory and recorded to "SubresourceFilter.PageLoad.SubresourceEvaluation.*Duration" histograms when DidFinishLoad is called for the main frame. BUG=609747, 672519 Committed: https://crrev.com/22be4914542ba9072ee2e6c7c3480881ebcaa6fe Cr-Commit-Position: refs/heads/master@{#440849}

Patch Set 1 #

Total comments: 23

Patch Set 2 : Address comments of engedy@ and add tests. #

Total comments: 18

Patch Set 3 : Address more comments from engedy@. #

Total comments: 19

Patch Set 4 : Address nits. #

Total comments: 2

Patch Set 5 : Rebase. Make tests work with and without PersistentHistograms. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -28 lines) Patch
M chrome/browser/subresource_filter/subresource_filter_browsertest.cc View 1 2 3 4 9 chunks +152 lines, -13 lines 0 comments Download
M chrome/test/data/subresource_filter/frame_set.html View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
A chrome/test/data/subresource_filter/frame_with_allowed_script.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/subresource_filter/frame_with_no_subresources.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/subresource_filter/included_allowed_script.js View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h View 1 2 4 chunks +12 lines, -0 lines 0 comments Download
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc View 1 2 3 4 7 chunks +46 lines, -4 lines 0 comments Download
M components/subresource_filter/content/common/subresource_filter_messages.h View 1 2 2 chunks +10 lines, -1 line 0 comments Download
M components/subresource_filter/content/renderer/subresource_filter_agent.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M components/subresource_filter/content/renderer/subresource_filter_agent.cc View 1 2 3 4 3 chunks +12 lines, -0 lines 0 comments Download
M components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc View 1 2 3 4 7 chunks +19 lines, -6 lines 0 comments Download
M components/subresource_filter/core/browser/subresource_filter_features_test_support.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 38 (21 generated)
pkalinnikov
Balazs, PTAL. I will add tests later. Please verify the approach, and maybe suggest where ...
4 years ago (2016-12-16 16:54:23 UTC) #2
engedy
Looking good so far. Regarding testing, we should have: -- some basic tests in subresource_filter_agent_unittest, ...
4 years ago (2016-12-19 10:18:42 UTC) #3
pkalinnikov
Addressed comments and added tests. https://codereview.chromium.org/2581043003/diff/1/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc (right): https://codereview.chromium.org/2581043003/diff/1/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc#newcode37 components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:37: bool ShouldMeasurePerformanceForThisPage() { On ...
4 years ago (2016-12-21 15:28:47 UTC) #6
engedy
Thank you, looks great, LGTM! It's awesome to finally have some end-to-end test for histograms. ...
4 years ago (2016-12-21 19:10:28 UTC) #9
pkalinnikov
Balazs, please take another look. Pay attention to the questions in the browsertest. I will ...
4 years ago (2016-12-22 16:53:04 UTC) #12
engedy
Still LGTM % nits, see answers below. https://codereview.chromium.org/2581043003/diff/40001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc File chrome/browser/subresource_filter/subresource_filter_browsertest.cc (right): https://codereview.chromium.org/2581043003/diff/40001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc#newcode251 chrome/browser/subresource_filter/subresource_filter_browsertest.cc:251: const char* ...
3 years, 12 months ago (2016-12-23 10:34:27 UTC) #15
pkalinnikov
https://codereview.chromium.org/2581043003/diff/40001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc File chrome/browser/subresource_filter/subresource_filter_browsertest.cc (right): https://codereview.chromium.org/2581043003/diff/40001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc#newcode251 chrome/browser/subresource_filter/subresource_filter_browsertest.cc:251: const char* kSubframeNames[] = {"one", "three"}; On 2016/12/23 10:34:26, ...
3 years, 12 months ago (2016-12-27 11:57:52 UTC) #17
engedy
LGTM. Let's find some OWNERS. https://codereview.chromium.org/2581043003/diff/40001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc File chrome/browser/subresource_filter/subresource_filter_browsertest.cc (right): https://codereview.chromium.org/2581043003/diff/40001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc#newcode331 chrome/browser/subresource_filter/subresource_filter_browsertest.cc:331: time_recorded ? 6 : ...
3 years, 12 months ago (2016-12-27 12:05:05 UTC) #18
pkalinnikov
Hi Chris and Ilya, palmer@: Please review the new IPC message in "subresource_filter_messages.h". isherman@: Please ...
3 years, 12 months ago (2016-12-27 12:08:09 UTC) #20
engedy
https://codereview.chromium.org/2581043003/diff/60001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc File chrome/browser/subresource_filter/subresource_filter_browsertest.cc (right): https://codereview.chromium.org/2581043003/diff/60001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc#newcode328 chrome/browser/subresource_filter/subresource_filter_browsertest.cc:328: SubprocessMetricsProvider::MergeHistogramDeltasForTesting(); TIL that you need to call content::FetchHistogramsFromChildProcesses() here ...
3 years, 12 months ago (2016-12-27 17:20:11 UTC) #21
palmer
lgtm
3 years, 12 months ago (2016-12-27 18:52:44 UTC) #22
Ilya Sherman
metrics lgtm, thanks
3 years, 12 months ago (2016-12-27 22:53:02 UTC) #24
pkalinnikov
Thanks! https://codereview.chromium.org/2581043003/diff/60001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc File chrome/browser/subresource_filter/subresource_filter_browsertest.cc (right): https://codereview.chromium.org/2581043003/diff/60001/chrome/browser/subresource_filter/subresource_filter_browsertest.cc#newcode328 chrome/browser/subresource_filter/subresource_filter_browsertest.cc:328: SubprocessMetricsProvider::MergeHistogramDeltasForTesting(); On 2016/12/27 17:20:11, engedy wrote: > TIL ...
3 years, 11 months ago (2016-12-28 13:21:40 UTC) #27
engedy
LGTM.
3 years, 11 months ago (2016-12-28 13:32:31 UTC) #28
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/2581043003/80001
3 years, 11 months ago (2016-12-28 14:19:43 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001)
3 years, 11 months ago (2016-12-28 14:23:44 UTC) #36
commit-bot: I haz the power
3 years, 11 months ago (2017-01-02 15:49:02 UTC) #38
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/22be4914542ba9072ee2e6c7c3480881ebcaa6fe
Cr-Commit-Position: refs/heads/master@{#440849}

Powered by Google App Engine
This is Rietveld 408576698