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

Issue 282093011: metrics: Use absolute interval-based perf collection (Closed)

Created:
6 years, 7 months ago by Simon Que
Modified:
6 years, 6 months ago
Reviewers:
tipp, Ilya Sherman
CC:
chromium-reviews, jar (doing other things), asvitkine+watch_chromium.org
Visibility:
Public.

Description

metrics: Use absolute interval-based perf collection Replace the old CWP collection scheme with a new scheme: - Divide post-login time into four-hour intervals. - Randomly select a time in each interval to collect a perf profile. The probability distribution should be even across that interval. - Use the new SampledProfile protobuf to store the collected data. Note that since this patch still collects only perf data, the module perf_provider_chromeos is not renamed to reflect something more generic. We would like to introduce other types of data collection in the future but they may be in other modules, or we may create a new generic module for data collection. BUG=chromium:358778 TEST=The interval is too long to directly test. Shorten it to something on the order of a minute and rebuild and deploy Chrome. Should be getting some profile collections. I added some logging to print the collected data size. It's around 12 kB, and I get the same size data from running quipper manually: quipper 2 `which perf` record -a -e cycles -c 1000003 > /usr/local/perf.proto Signed-off-by: Simon Que <sque@chromium.org>; Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273971

Patch Set 1 #

Total comments: 19

Patch Set 2 : Addressed minor issues #

Patch Set 3 : Updated interval definition; fixed scheduling #

Patch Set 4 : Rebased on top of blundell's refactor (http://crbug.com/375776) #

Patch Set 5 : Refactor collection to allow different trigger events in the future #

Total comments: 18

Patch Set 6 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -64 lines) Patch
M chrome/browser/metrics/chromeos_metrics_provider.cc View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/metrics/perf_provider_chromeos.h View 1 2 3 4 5 4 chunks +27 lines, -18 lines 0 comments Download
M chrome/browser/metrics/perf_provider_chromeos.cc View 1 2 3 4 5 7 chunks +51 lines, -40 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Simon Que
6 years, 7 months ago (2014-05-16 17:53:43 UTC) #1
Ilya Sherman
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode97 chrome/browser/metrics/perf_provider_chromeos.cc:97: : weak_factory_(this), The weak pointer factory should always be ...
6 years, 7 months ago (2014-05-16 21:48:57 UTC) #2
tipp
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode30 chrome/browser/metrics/perf_provider_chromeos.cc:30: const size_t kPerfProfilingIntervalSeconds = 14400; It's clearer to write ...
6 years, 7 months ago (2014-05-16 22:17:26 UTC) #3
Simon Que
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode97 chrome/browser/metrics/perf_provider_chromeos.cc:97: : weak_factory_(this), On 2014/05/16 21:48:57, Ilya Sherman wrote: > ...
6 years, 7 months ago (2014-05-17 03:25:07 UTC) #4
Simon Que
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode134 chrome/browser/metrics/perf_provider_chromeos.cc:134: base::RandGenerator(kPerfProfilingIntervalSeconds); On 2014/05/16 22:17:26, tipp wrote: > You want ...
6 years, 7 months ago (2014-05-17 03:46:26 UTC) #5
tipp
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode127 chrome/browser/metrics/perf_provider_chromeos.cc:127: int64 seconds_since_epoch = (now - epoch).InSeconds(); How about milliseconds ...
6 years, 7 months ago (2014-05-17 04:18:28 UTC) #6
Simon Que
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode127 chrome/browser/metrics/perf_provider_chromeos.cc:127: int64 seconds_since_epoch = (now - epoch).InSeconds(); On 2014/05/17 04:18:29, ...
6 years, 7 months ago (2014-05-19 18:37:12 UTC) #7
Simon Que
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode97 chrome/browser/metrics/perf_provider_chromeos.cc:97: : weak_factory_(this), On 2014/05/17 03:25:07, Simon Que wrote: > ...
6 years, 7 months ago (2014-05-19 22:45:00 UTC) #8
Simon Que
https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/1/chrome/browser/metrics/perf_provider_chromeos.cc#newcode30 chrome/browser/metrics/perf_provider_chromeos.cc:30: const size_t kPerfProfilingIntervalSeconds = 14400; On 2014/05/16 22:17:26, tipp ...
6 years, 7 months ago (2014-05-20 20:47:34 UTC) #9
Ilya Sherman
I'll wait for you and Tipp to resolve the question of how to sample the ...
6 years, 7 months ago (2014-05-21 08:55:16 UTC) #10
tipp
On 2014/05/21 08:55:16, Ilya Sherman wrote: > I'll wait for you and Tipp to resolve ...
6 years, 6 months ago (2014-05-29 21:47:44 UTC) #11
Ilya Sherman
On 2014/05/29 21:47:44, tipp wrote: > On 2014/05/21 08:55:16, Ilya Sherman wrote: > > I'll ...
6 years, 6 months ago (2014-05-29 21:59:54 UTC) #12
Simon Que
On 2014/05/29 21:59:54, Ilya Sherman wrote: > On 2014/05/29 21:47:44, tipp wrote: > > On ...
6 years, 6 months ago (2014-05-29 22:02:48 UTC) #13
Ilya Sherman
On 2014/05/29 22:02:48, Simon Que wrote: > On 2014/05/29 21:59:54, Ilya Sherman wrote: > > ...
6 years, 6 months ago (2014-05-29 22:08:02 UTC) #14
Ilya Sherman
https://codereview.chromium.org/282093011/diff/70001/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/70001/chrome/browser/metrics/perf_provider_chromeos.cc#newcode29 chrome/browser/metrics/perf_provider_chromeos.cc:29: // This interval is twenty-four hours. nit: Please update ...
6 years, 6 months ago (2014-05-29 22:56:49 UTC) #15
Simon Que
https://codereview.chromium.org/282093011/diff/70001/chrome/browser/metrics/perf_provider_chromeos.cc File chrome/browser/metrics/perf_provider_chromeos.cc (right): https://codereview.chromium.org/282093011/diff/70001/chrome/browser/metrics/perf_provider_chromeos.cc#newcode29 chrome/browser/metrics/perf_provider_chromeos.cc:29: // This interval is twenty-four hours. On 2014/05/29 22:56:49, ...
6 years, 6 months ago (2014-05-30 01:21:45 UTC) #16
Ilya Sherman
LGTM, thanks.
6 years, 6 months ago (2014-05-30 19:52:54 UTC) #17
Ilya Sherman
The CQ bit was checked by isherman@chromium.org
6 years, 6 months ago (2014-05-30 19:53:01 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sque@chromium.org/282093011/90001
6 years, 6 months ago (2014-05-30 19:55:49 UTC) #19
commit-bot: I haz the power
6 years, 6 months ago (2014-05-31 01:04:27 UTC) #20
Message was sent while issue was closed.
Change committed as 273971

Powered by Google App Engine
This is Rietveld 408576698