Rework UseCounter to log UMA metrics as they occur |
|||||||||||||||||
Issue descriptionToday the blink UseCounter keeps track of usage in bin vectors, and then records the usage as UMA metrics in the following situations: 1. on beginning of page load (Page::didCommitLoad for the mainFrame) incrementing PageVisits 2. on graceful Page destruction (UseCounter::~UseCounter) incrementing both PageVisits and PageDestruction counters. Note that renderer fast shutdown means this often will not be hit This can also means that on navigation, PageVisits is counted twice ( issue 236262 ). I think we should be reworking UseCounter to register the UMA counts immediately on usage, using the bits only to ensure we report only one usage per page load. Combined with the fix for issue 544971 , this should ensure we're getting accurate usage counts. We rely on this UseCounter data pretty heavily for API decisions, so I think this is important. Unless anyone else wants to take it on, I'll try to make time for this sometime soon. Note that fixing this will cause a discontinuity in our UseCounter data. I don't think there's really anything to be done about that. We could rename the counter if we want to cause a completely clean break with history, or we can just get used to there being a change in a specific release (it'll be interesting to see how inaccurate the data we have been relying on is).
,
Mar 28 2016
,
Mar 29 2016
Even by just changing the behavior we should see pretty clearly what the change looks like when it hits the stable channel. It'll presumably approach the final value following the kind of S-curve we currently see when things reach stable.
,
Mar 31 2016
Yeah, and we can generate data internally during the transition that splits the two releases out. It would be a bunch of extra complexity to try to preserve the old busted approach along with the new one, I don't think it's worth it. Maybe we'll want to add some sort of indicator to the chromestatus timeline though, just to reduce the cost of people being surprised / digging into the discontinuity.
,
Apr 1 2016
Just having milestone markers on the graphs would be nice in general.
,
May 26 2016
,
May 31 2016
Going into this (and issue 236262 ) in detail, it doesn't seem THAT bad to try to keep the existing metrics around while we transition to new ones with more correct semantics. The metrics are definitely going to change dramatically (see issue 597963 ) and it'll probably take a little time to ensure we have confidence in them so it makes some sense to have overlap. See https://codereview.chromium.org/2023903003/ for a WIP patch along these lines
,
Jun 23 2016
Renaming Blink>Architecture to Blink>Internals
,
Jun 23 2016
,
Jun 23 2016
,
Jun 30 2016
,
Jul 7 2016
,
Aug 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ef896c91bab517924c6658af5f71ee3d8511b3b8 commit ef896c91bab517924c6658af5f71ee3d8511b3b8 Author: rbyers <rbyers@chromium.org> Date: Fri Aug 26 18:27:24 2016 Minor UseCounter clean-ups Remove the mostly useless CountBits abstraction and better align the generic feature and CSS property usage tracking. Also a couple other minor cleanups and comments warning of outstanding issues. BUG= 597963 Review-Url: https://codereview.chromium.org/2284503002 Cr-Commit-Position: refs/heads/master@{#414753} [modify] https://crrev.com/ef896c91bab517924c6658af5f71ee3d8511b3b8/third_party/WebKit/Source/core/frame/UseCounter.cpp [modify] https://crrev.com/ef896c91bab517924c6658af5f71ee3d8511b3b8/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/ef896c91bab517924c6658af5f71ee3d8511b3b8/third_party/WebKit/Source/core/page/Page.cpp [modify] https://crrev.com/ef896c91bab517924c6658af5f71ee3d8511b3b8/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp [modify] https://crrev.com/ef896c91bab517924c6658af5f71ee3d8511b3b8/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
,
Aug 29 2016
,
Sep 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/631a26b68f615f8282efba7ded2a6f4fac236482 commit 631a26b68f615f8282efba7ded2a6f4fac236482 Author: rbyers <rbyers@chromium.org> Date: Mon Sep 12 16:56:57 2016 Add new UseCounter metric Adds a new UMA histogram "WebCore.UseCounter_TEST" which fixes the issue with data loss on fast shutdown while temporarily preseving the original semantics in the legacy "WebCore.FeatureObserver" histogram. Also overhauls the tests to look directly at the histograms. Note that the semantics of the new UseCounter are still under flux and being validated, hence the '_TEST' suffix in the histogram name. Once validated it'll be renamed to simply WebCore.UseCounter and we will expect to never change the semantics of the histogram again (without rename). BUG= 597963 Review-Url: https://codereview.chromium.org/2290733002 Cr-Commit-Position: refs/heads/master@{#417957} [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/core/frame/PRESUBMIT.py [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/core/frame/UseCounter.cpp [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/core/frame/UseCounterTest.cpp [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/platform/testing/HistogramTester.cpp [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/third_party/WebKit/Source/platform/testing/HistogramTester.h [modify] https://crrev.com/631a26b68f615f8282efba7ded2a6f4fac236482/tools/metrics/histograms/histograms.xml
,
Sep 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/705c8eb7fa3ee2ee19da9c78fdd8266108ae207e commit 705c8eb7fa3ee2ee19da9c78fdd8266108ae207e Author: dtapuska <dtapuska@chromium.org> Date: Tue Sep 13 16:22:31 2016 Fix clang-cl release component build failure on windows. Issue was caused in change: https://codereview.chromium.org/2290733002 BUG= 597963 Review-Url: https://codereview.chromium.org/2336253002 Cr-Commit-Position: refs/heads/master@{#418267} [modify] https://crrev.com/705c8eb7fa3ee2ee19da9c78fdd8266108ae207e/third_party/WebKit/Source/core/frame/UseCounter.h
,
Oct 3 2016
Landed the key changes, keeping open on M56 to track switching to the new counter.
,
Oct 7 2016
Can chrome://histograms be updated to display the WebCore.UseCounter_TEST stats? (So that when you are developing a new histogram, you can see the actual count, rather than the old on-page-destruction-maybe count.)
,
Oct 7 2016
That page is dynamic. So it should appear. The only problem is when a renderer's histogram counts are fetched from the browser. And that occurs as specific times. So you should reload the page you are monitoring so see the histogram counts change.
,
Oct 9 2016
chrome://histograms is dynamic? In my experience you have to reload the page to see any changes. But you're right that it does show WebCore.UseCounter_TEST (I was stupidly only looking at the WebCore.FeatureObserver section). So ignore #18.
,
Oct 17 2016
When switching to the new counter / final name, I should probably also go with "Blink.UseCounter" instead of "WebCore.UseCounter" (since that's where most blink-related histograms seem to go these days).
,
Oct 21 2016
mgiuca, it's dynamic in that it's generated from data but it doesn't refresh automatically. Everything on that page is current as far as the browser process is concerned. However, metrics are only collected from child processes and merged into the browser process about every 30 minutes (on desktop). Making the histograms page fetch all child histograms before displaying is non-trivial. Feel free to voice your opinion in issue #602295 .
,
Oct 23 2016
#22: metrics are only collected from child processes and merged into the browser process about every 30 minutes (on desktop). What? Are you sure? I generally see stats right away (after a refresh) from the renderers (though perhaps I'm only thinking of Android).
,
Oct 24 2016
Positive. But I forgot one: It also gets collected when the child process exits.
,
Oct 24 2016
The other thing to keep in mind is that the renderer can also trigger explicitly a push to the browser process of the metrics data, via RenderThreadImpl::UpdateHistograms() - so it's possible some other metrics end up triggering that while other don't. Brian, question for you - if we switch to persistent histograms, do we regress in this area? (i.e. does UpdateHistograms() become a no-op for all histograms living in persistent memory - and thus we lose the mechanism to force update histograms from renderer side?)
,
Oct 24 2016
Correct. UpdateHistograms was to be removed eventually. Another option would be to keep it around and have the IPC receiver trigger a local collection.
,
Nov 11 2016
,
Nov 11 2016
,
Nov 28 2016
,
Nov 28 2016
,
Dec 23 2016
,
Dec 23 2016
Moved the meta-level work to issue 676837 . The change for this issue is long-landed.
,
Jan 3 2017
,
Feb 17 2017
|
|||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Mar 28 2016