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

Issue 1891913002: Support saving browser metrics to disk and reading them during next run. (Closed)

Created:
4 years, 8 months ago by bcwhite
Modified:
4 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support saving browser metrics to disk and reading them during next run. This CL doesn't attempt to persist metrics during a crash. That will be addressed later. BUG=546019 TBR=nasko nasko: browser_main_runner.cc (moved existing creation code earlier but disable it until experiment is examined) Committed: https://crrev.com/65e57d078b22b3695af734e0262c2b076a21b428 Cr-Commit-Position: refs/heads/master@{#393521}

Patch Set 1 #

Patch Set 2 : fixed some build problems #

Total comments: 30

Patch Set 3 : addressed small review comments by Ilya #

Patch Set 4 : rebased #

Patch Set 5 : back-out PrepareDifference change #

Total comments: 13

Patch Set 6 : rebased #

Patch Set 7 : addressed review comments by Ilya #

Total comments: 36

Patch Set 8 : addressed some review comments by Ilya #

Patch Set 9 : addressed some review comments by Ilya #

Total comments: 4

Patch Set 10 : addressed review comments by Ilya #

Total comments: 6

Patch Set 11 : rebased #

Patch Set 12 : added support for associating file metrics with previous run #

Patch Set 13 : restore PrepareDifference to properly support read-only histogram data #

Patch Set 14 : remove DCHECK_IS_ON from .h files because it's not always defined and don't want to add the include #

Total comments: 42

Patch Set 15 : addressed review comments by Ilya #

Total comments: 11

Patch Set 16 : addressed review comments by Ilya #

Total comments: 12

Patch Set 17 : addressed review comments by Ilya #

Total comments: 10

Patch Set 18 : addressed review comments by Alexei; delete saved metrics file if reporting not enabled #

Total comments: 10

Patch Set 19 : addressed review comments by Alexei #

Patch Set 20 : pass 'enabled' as parameter #

Patch Set 21 : return FileMetricsProvider instead of registering it directly #

Total comments: 2

Patch Set 22 : get task-runner once and remember it #

Patch Set 23 : rebased #

Patch Set 24 : removed some unnecessary includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+575 lines, -78 lines) Patch
M base/metrics/histogram.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -0 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -0 lines 0 comments Download
M base/metrics/histogram_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -0 lines 0 comments Download
M base/metrics/histogram_snapshot_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +21 lines, -6 lines 0 comments Download
M base/metrics/histogram_snapshot_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +12 lines, -5 lines 0 comments Download
M base/metrics/histogram_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +27 lines, -1 line 0 comments Download
M base/metrics/persistent_histogram_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +32 lines, -4 lines 0 comments Download
M base/metrics/persistent_histogram_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +52 lines, -1 line 0 comments Download
M base/metrics/persistent_memory_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +6 lines, -0 lines 0 comments Download
M base/metrics/persistent_memory_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +5 lines, -0 lines 0 comments Download
M base/metrics/sparse_histogram.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
M base/metrics/sparse_histogram.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_field_trials.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +6 lines, -11 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +74 lines, -12 lines 0 comments Download
M components/metrics/file_metrics_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +23 lines, -0 lines 0 comments Download
M components/metrics/file_metrics_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +96 lines, -2 lines 0 comments Download
M components/metrics/file_metrics_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +77 lines, -26 lines 0 comments Download
M components/metrics/metrics_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +11 lines, -4 lines 0 comments Download
M components/metrics/metrics_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M components/metrics/metrics_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +8 lines, -6 lines 0 comments Download
M content/browser/browser_main_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +11 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +63 lines, -0 lines 0 comments Download

Messages

Total messages: 61 (21 generated)
bcwhite
4 years, 8 months ago (2016-04-15 19:33:09 UTC) #4
Ilya Sherman
https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_base.h#newcode207 base/metrics/histogram_base.h:207: virtual std::unique_ptr<HistogramSamples> SnapshotDifference() const = 0; Hmm, I think ...
4 years, 8 months ago (2016-04-19 00:57:46 UTC) #5
bcwhite
https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_base.h#newcode207 base/metrics/histogram_base.h:207: virtual std::unique_ptr<HistogramSamples> SnapshotDifference() const = 0; On 2016/04/19 00:57:46, ...
4 years, 8 months ago (2016-04-19 16:33:38 UTC) #6
Ilya Sherman
Thanks, Brian. https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_snapshot_manager.h File base/metrics/histogram_snapshot_manager.h (right): https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_snapshot_manager.h#newcode76 base/metrics/histogram_snapshot_manager.h:76: void PrepareDifference(const HistogramBase* histogram); On 2016/04/19 16:33:37, ...
4 years, 8 months ago (2016-04-20 07:12:15 UTC) #7
bcwhite
https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_snapshot_manager.h File base/metrics/histogram_snapshot_manager.h (right): https://codereview.chromium.org/1891913002/diff/60001/base/metrics/histogram_snapshot_manager.h#newcode76 base/metrics/histogram_snapshot_manager.h:76: void PrepareDifference(const HistogramBase* histogram); On 2016/04/20 07:12:14, Ilya Sherman ...
4 years, 8 months ago (2016-04-20 16:47:46 UTC) #9
Ilya Sherman
Thanks Brian. I still have questions about the PrepareDifference semantics, but since that's not part ...
4 years, 8 months ago (2016-04-20 17:10:33 UTC) #10
bcwhite
https://codereview.chromium.org/1891913002/diff/140001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/1891913002/diff/140001/base/metrics/persistent_histogram_allocator.cc#newcode719 base/metrics/persistent_histogram_allocator.cc:719: if (persistent_location_.empty()) On 2016/04/20 17:10:33, Ilya Sherman wrote: > ...
4 years, 8 months ago (2016-04-22 15:18:05 UTC) #13
Alexei Svitkine (slow)
I didn't look at this CL in detail, but I have some high level questions: ...
4 years, 8 months ago (2016-04-22 15:27:39 UTC) #15
bcwhite
> - If this doesn't persist things during a crash, what's the point? Because on ...
4 years, 8 months ago (2016-04-22 16:04:36 UTC) #16
Ilya Sherman
Btw, I'm in Montreal this week. Feel free to come find me if you'd like ...
4 years, 8 months ago (2016-04-25 19:48:41 UTC) #17
bcwhite
>Btw, I'm in Montreal this week. Feel free to come find >me if you'd like ...
4 years, 8 months ago (2016-04-25 20:37:18 UTC) #18
Ilya Sherman
https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc#newcode42 chrome/browser/chrome_browser_field_trials.cc:42: kAllocatorName); On 2016/04/25 20:37:17, bcwhite wrote: > On 2016/04/25 ...
4 years, 8 months ago (2016-04-25 21:12:11 UTC) #19
bcwhite
https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc#newcode42 chrome/browser/chrome_browser_field_trials.cc:42: kAllocatorName); On 2016/04/25 21:12:10, Ilya Sherman wrote: > On ...
4 years, 8 months ago (2016-04-26 13:32:30 UTC) #20
Ilya Sherman
https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc#newcode42 chrome/browser/chrome_browser_field_trials.cc:42: kAllocatorName); On 2016/04/26 13:32:29, bcwhite wrote: > On 2016/04/25 ...
4 years, 8 months ago (2016-04-26 20:01:24 UTC) #21
bcwhite
https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc File chrome/browser/chrome_browser_field_trials.cc (right): https://codereview.chromium.org/1891913002/diff/140001/chrome/browser/chrome_browser_field_trials.cc#newcode42 chrome/browser/chrome_browser_field_trials.cc:42: kAllocatorName); On 2016/04/26 20:01:24, Ilya Sherman wrote: > On ...
4 years, 8 months ago (2016-04-26 21:04:26 UTC) #22
Alexei Svitkine (slow)
On 2016/04/22 16:04:36, bcwhite wrote: > > - If we're reading the metrics from the ...
4 years, 8 months ago (2016-04-26 21:23:30 UTC) #23
bcwhite
On 2016/04/26 21:23:30, Alexei Svitkine wrote: > On 2016/04/22 16:04:36, bcwhite wrote: > > > ...
4 years, 8 months ago (2016-04-26 21:30:06 UTC) #24
Alexei Svitkine (slow)
Okay - I've added Ilya to that meeting. On Tue, Apr 26, 2016 at 5:30 ...
4 years, 7 months ago (2016-04-27 13:48:11 UTC) #25
Ilya Sherman
Probably makes sense to discuss in person tomorrow. Just jotting down some thoughts now so ...
4 years, 7 months ago (2016-04-27 20:31:33 UTC) #26
bcwhite
https://codereview.chromium.org/1891913002/diff/280001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/1891913002/diff/280001/base/metrics/persistent_histogram_allocator.cc#newcode50 base/metrics/persistent_histogram_allocator.cc:50: bool g_allocator_enabled; On 2016/04/27 20:31:33, Ilya Sherman wrote: > ...
4 years, 7 months ago (2016-05-02 14:46:47 UTC) #31
Ilya Sherman
Thanks, Brian. https://codereview.chromium.org/1891913002/diff/420001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/1891913002/diff/420001/base/metrics/histogram_base.h#newcode208 base/metrics/histogram_base.h:208: // method or to SnapshotDelta() should be ...
4 years, 7 months ago (2016-05-04 06:48:08 UTC) #32
bcwhite
https://codereview.chromium.org/1891913002/diff/420001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/1891913002/diff/420001/base/metrics/histogram_base.h#newcode208 base/metrics/histogram_base.h:208: // method or to SnapshotDelta() should be done as ...
4 years, 7 months ago (2016-05-04 14:12:51 UTC) #33
Ilya Sherman
https://codereview.chromium.org/1891913002/diff/420001/components/metrics/file_metrics_provider.cc File components/metrics/file_metrics_provider.cc (right): https://codereview.chromium.org/1891913002/diff/420001/components/metrics/file_metrics_provider.cc#newcode282 components/metrics/file_metrics_provider.cc:282: // before the first call to this method. On ...
4 years, 7 months ago (2016-05-05 07:22:37 UTC) #34
bcwhite
https://codereview.chromium.org/1891913002/diff/420001/components/metrics/file_metrics_provider.cc File components/metrics/file_metrics_provider.cc (right): https://codereview.chromium.org/1891913002/diff/420001/components/metrics/file_metrics_provider.cc#newcode282 components/metrics/file_metrics_provider.cc:282: // before the first call to this method. On ...
4 years, 7 months ago (2016-05-05 16:01:17 UTC) #36
Ilya Sherman
I guess I'm willing to agree to disagree about the remaining points of disagreement, so ...
4 years, 7 months ago (2016-05-05 22:22:53 UTC) #38
bcwhite
https://codereview.chromium.org/1891913002/diff/280001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/1891913002/diff/280001/base/metrics/persistent_histogram_allocator.cc#newcode50 base/metrics/persistent_histogram_allocator.cc:50: bool g_allocator_enabled; On 2016/05/05 22:22:52, Ilya Sherman (Away May ...
4 years, 7 months ago (2016-05-06 16:59:28 UTC) #39
Alexei Svitkine (slow)
Looking at the CL now.
4 years, 7 months ago (2016-05-09 21:06:57 UTC) #40
Alexei Svitkine (slow)
https://codereview.chromium.org/1891913002/diff/520001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/1891913002/diff/520001/base/metrics/histogram.h#newcode317 base/metrics/histogram.h:317: // Flag to indicate if PrepareFinalDelta has been previously ...
4 years, 7 months ago (2016-05-09 21:24:10 UTC) #41
bcwhite
https://codereview.chromium.org/1891913002/diff/520001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/1891913002/diff/520001/base/metrics/histogram.h#newcode317 base/metrics/histogram.h:317: // Flag to indicate if PrepareFinalDelta has been previously ...
4 years, 7 months ago (2016-05-10 15:42:41 UTC) #42
Alexei Svitkine (slow)
Just a few more things. https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode160 chrome/browser/metrics/chrome_metrics_service_client.cc:160: metrics::MetricsStateManager* metrics_state_manager) { Nit: ...
4 years, 7 months ago (2016-05-10 19:55:42 UTC) #43
bcwhite
https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode160 chrome/browser/metrics/chrome_metrics_service_client.cc:160: metrics::MetricsStateManager* metrics_state_manager) { On 2016/05/10 19:55:42, Alexei Svitkine wrote: ...
4 years, 7 months ago (2016-05-11 15:47:13 UTC) #44
Alexei Svitkine (slow)
https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode160 chrome/browser/metrics/chrome_metrics_service_client.cc:160: metrics::MetricsStateManager* metrics_state_manager) { On 2016/05/11 15:47:12, bcwhite wrote: > ...
4 years, 7 months ago (2016-05-11 15:51:28 UTC) #45
bcwhite
https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/1891913002/diff/540001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode160 chrome/browser/metrics/chrome_metrics_service_client.cc:160: metrics::MetricsStateManager* metrics_state_manager) { On 2016/05/11 15:51:28, Alexei Svitkine wrote: ...
4 years, 7 months ago (2016-05-11 17:58:34 UTC) #46
Alexei Svitkine (slow)
lgtm % remaining comment Curious to see what the timing histograms reveal once this lands. ...
4 years, 7 months ago (2016-05-11 18:09:20 UTC) #47
bcwhite
https://codereview.chromium.org/1891913002/diff/600001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/1891913002/diff/600001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode205 chrome/browser/metrics/chrome_metrics_service_client.cc:205: base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN) On 2016/05/11 18:09:20, Alexei Svitkine wrote: > Nit: ...
4 years, 7 months ago (2016-05-12 15:17:12 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1891913002/680001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1891913002/680001
4 years, 7 months ago (2016-05-13 13:46:47 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/182693)
4 years, 7 months ago (2016-05-13 13:53:56 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1891913002/680001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1891913002/680001
4 years, 7 months ago (2016-05-13 14:03:46 UTC) #57
commit-bot: I haz the power
Committed patchset #24 (id:680001)
4 years, 7 months ago (2016-05-13 14:39:58 UTC) #59
commit-bot: I haz the power
4 years, 7 months ago (2016-05-13 14:41:02 UTC) #61
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/65e57d078b22b3695af734e0262c2b076a21b428
Cr-Commit-Position: refs/heads/master@{#393521}

Powered by Google App Engine
This is Rietveld 408576698