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

Issue 1485763002: Merge multiple histogram snapshots into single one for reporting. (Closed)

Created:
5 years ago by bcwhite
Modified:
4 years, 10 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@shared-histograms
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Merge multiple histogram snapshots into single one for reporting. With multiple processes each now capable of reporting seperately, the values need to be merged before being flattened and sent to the server in order to conserve server space. BUG=546019 Committed: https://crrev.com/c85a1f82ce2ab8c4ff9c19989f17234ea8abb865 Cr-Commit-Position: refs/heads/master@{#376264}

Patch Set 1 #

Patch Set 2 : added merge test #

Total comments: 10

Patch Set 3 : addressed review comments by Alexei #

Patch Set 4 : improved merging and added tests #

Patch Set 5 : embed previously logged samples inside histogram and have it calculate its own deltas #

Patch Set 6 : added test and fixed some compile problems #

Patch Set 7 : added check againt multiple start/finish calls #

Patch Set 8 : add support for read-only histograms #

Patch Set 9 : rebased #

Total comments: 43

Patch Set 10 : addressed review comments by Alexei #

Patch Set 11 : fixed some build problems on other architectures #

Patch Set 12 : revert scoped_ptr inside SampleInfo so it builds on all architectures #

Patch Set 13 : fix loss-of-precision on 64-bit #

Patch Set 14 : give logged samples its own metadata and add tests #

Patch Set 15 : more small changes from review comments #

Patch Set 16 : Change 'inconsistencies' from int to unsigned. #

Total comments: 16

Patch Set 17 : addressed review comments by Alexei #

Patch Set 18 : rebased #

Total comments: 8

Patch Set 19 : addressed review comments by Alexei #

Total comments: 2

Patch Set 20 : switch 'unsigned' to 'uint32_t' #

Total comments: 6

Patch Set 21 : addressed remaining review comments by Alexei #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -102 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 18 19 11 chunks +31 lines, -10 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 11 chunks +63 lines, -29 lines 0 comments Download
M base/metrics/histogram_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +12 lines, -3 lines 0 comments Download
M base/metrics/histogram_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M base/metrics/histogram_persistence.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +44 lines, -13 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 19 20 2 chunks +57 lines, -11 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 16 17 18 19 20 1 chunk +86 lines, -30 lines 0 comments Download
M base/metrics/histogram_snapshot_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +52 lines, -3 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 15 16 17 3 chunks +31 lines, -2 lines 0 comments Download
M base/metrics/sparse_histogram.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M base/metrics/sparse_histogram.cc View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 36 (10 generated)
bcwhite
Yet another CL. ;-) I'm still working on the tests but wanted to see if ...
5 years ago (2015-11-30 17:03:36 UTC) #2
Alexei Svitkine (slow)
https://codereview.chromium.org/1485763002/diff/20001/base/metrics/histogram_snapshot_manager.cc File base/metrics/histogram_snapshot_manager.cc (right): https://codereview.chromium.org/1485763002/diff/20001/base/metrics/histogram_snapshot_manager.cc#newcode48 base/metrics/histogram_snapshot_manager.cc:48: SampleInfo& sample_info = known_histograms_[histogram->name_hash()]; Nit: Make this a pointer, ...
5 years ago (2015-12-04 18:30:11 UTC) #3
bcwhite
https://codereview.chromium.org/1485763002/diff/20001/base/metrics/histogram_snapshot_manager.cc File base/metrics/histogram_snapshot_manager.cc (right): https://codereview.chromium.org/1485763002/diff/20001/base/metrics/histogram_snapshot_manager.cc#newcode48 base/metrics/histogram_snapshot_manager.cc:48: SampleInfo& sample_info = known_histograms_[histogram->name_hash()]; On 2015/12/04 18:30:11, Alexei Svitkine ...
5 years ago (2015-12-08 17:32:18 UTC) #4
bcwhite
New design that keeps "logged" inside the actual histograms. This makes it much easier to ...
4 years, 11 months ago (2016-01-26 21:52:44 UTC) #5
bcwhite
On 2016/01/26 21:52:44, bcwhite wrote: > New design that keeps "logged" inside the actual histograms. ...
4 years, 10 months ago (2016-02-09 13:23:26 UTC) #8
Alexei Svitkine (slow)
Will look today - sorry for the delays.
4 years, 10 months ago (2016-02-09 17:28:51 UTC) #9
Alexei Svitkine (slow)
https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram.cc#newcode437 base/metrics/histogram.cc:437: // If nothing has been previously logged, save this ...
4 years, 10 months ago (2016-02-09 19:46:52 UTC) #10
bcwhite
https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram.cc#newcode437 base/metrics/histogram.cc:437: // If nothing has been previously logged, save this ...
4 years, 10 months ago (2016-02-11 16:42:39 UTC) #11
bcwhite
https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.h File base/metrics/histogram_snapshot_manager.h (right): https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.h#newcode38 base/metrics/histogram_snapshot_manager.h:38: // for this to be a scoped_ptr<> because it ...
4 years, 10 months ago (2016-02-12 02:03:07 UTC) #12
bcwhite
Nice to see everything green again now that other mini-CLs have been committed. PTAL. I'm ...
4 years, 10 months ago (2016-02-15 12:53:24 UTC) #17
Alexei Svitkine (slow)
https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.cc File base/metrics/histogram_snapshot_manager.cc (right): https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.cc#newcode90 base/metrics/histogram_snapshot_manager.cc:90: sample_info->inconsistencies |= corruption | kNewInconsistency; On 2016/02/11 16:42:39, bcwhite ...
4 years, 10 months ago (2016-02-16 16:46:05 UTC) #18
bcwhite
https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.h File base/metrics/histogram_snapshot_manager.h (right): https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.h#newcode88 base/metrics/histogram_snapshot_manager.h:88: void PrepareOnce(const HistogramBase* histogram); On 2016/02/16 16:46:05, Alexei Svitkine ...
4 years, 10 months ago (2016-02-16 18:06:10 UTC) #19
bcwhite
Change of "inconsistencies" from int to unsigned also done. https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.cc File base/metrics/histogram_snapshot_manager.cc (right): https://codereview.chromium.org/1485763002/diff/200001/base/metrics/histogram_snapshot_manager.cc#newcode90 base/metrics/histogram_snapshot_manager.cc:90: ...
4 years, 10 months ago (2016-02-16 19:56:00 UTC) #20
Alexei Svitkine (slow)
https://codereview.chromium.org/1485763002/diff/410001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/1485763002/diff/410001/base/metrics/histogram.h#newcode170 base/metrics/histogram.h:170: // have memory over-writes, or DRAM failures). Nit: While ...
4 years, 10 months ago (2016-02-17 16:21:12 UTC) #21
bcwhite
https://codereview.chromium.org/1485763002/diff/410001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/1485763002/diff/410001/base/metrics/histogram.h#newcode170 base/metrics/histogram.h:170: // have memory over-writes, or DRAM failures). On 2016/02/17 ...
4 years, 10 months ago (2016-02-17 17:58:21 UTC) #22
Alexei Svitkine (slow)
https://codereview.chromium.org/1485763002/diff/410001/base/metrics/statistics_recorder.cc File base/metrics/statistics_recorder.cc (right): https://codereview.chromium.org/1485763002/diff/410001/base/metrics/statistics_recorder.cc#newcode395 base/metrics/statistics_recorder.cc:395: void StatisticsRecorder::ResetForTesting() { On 2016/02/17 17:58:20, bcwhite wrote: > ...
4 years, 10 months ago (2016-02-17 18:15:17 UTC) #23
bcwhite
https://codereview.chromium.org/1485763002/diff/410001/base/metrics/statistics_recorder.cc File base/metrics/statistics_recorder.cc (right): https://codereview.chromium.org/1485763002/diff/410001/base/metrics/statistics_recorder.cc#newcode395 base/metrics/statistics_recorder.cc:395: void StatisticsRecorder::ResetForTesting() { On 2016/02/17 18:15:16, Alexei Svitkine wrote: ...
4 years, 10 months ago (2016-02-17 19:39:50 UTC) #24
Alexei Svitkine (slow)
https://codereview.chromium.org/1485763002/diff/450001/base/metrics/histogram_snapshot_manager_unittest.cc File base/metrics/histogram_snapshot_manager_unittest.cc (right): https://codereview.chromium.org/1485763002/diff/450001/base/metrics/histogram_snapshot_manager_unittest.cc#newcode57 base/metrics/histogram_snapshot_manager_unittest.cc:57: const std::string& name) { Nit: Fits on previous line? ...
4 years, 10 months ago (2016-02-18 15:47:41 UTC) #25
bcwhite
https://codereview.chromium.org/1485763002/diff/450001/base/metrics/histogram_snapshot_manager_unittest.cc File base/metrics/histogram_snapshot_manager_unittest.cc (right): https://codereview.chromium.org/1485763002/diff/450001/base/metrics/histogram_snapshot_manager_unittest.cc#newcode57 base/metrics/histogram_snapshot_manager_unittest.cc:57: const std::string& name) { On 2016/02/18 15:47:40, Alexei Svitkine ...
4 years, 10 months ago (2016-02-18 17:07:05 UTC) #26
Alexei Svitkine (slow)
Greg has a comment about not using unsigned on the other CL. Let's make that ...
4 years, 10 months ago (2016-02-18 17:43:46 UTC) #27
bcwhite
> Greg has a comment about not using unsigned on the other CL. Let's make ...
4 years, 10 months ago (2016-02-18 17:59:11 UTC) #28
Alexei Svitkine (slow)
lgtm % remaining comments https://codereview.chromium.org/1485763002/diff/470001/base/metrics/histogram_snapshot_manager_unittest.cc File base/metrics/histogram_snapshot_manager_unittest.cc (right): https://codereview.chromium.org/1485763002/diff/470001/base/metrics/histogram_snapshot_manager_unittest.cc#newcode28 base/metrics/histogram_snapshot_manager_unittest.cc:28: histogram.histogram_name())); Nit: Maybe: ASSERT_FALSE(ContainsKey(recorded_delta_histogram_sum_, histogram.histogram_name()); ...
4 years, 10 months ago (2016-02-18 19:06:36 UTC) #29
bcwhite
https://codereview.chromium.org/1485763002/diff/470001/base/metrics/histogram_snapshot_manager_unittest.cc File base/metrics/histogram_snapshot_manager_unittest.cc (right): https://codereview.chromium.org/1485763002/diff/470001/base/metrics/histogram_snapshot_manager_unittest.cc#newcode28 base/metrics/histogram_snapshot_manager_unittest.cc:28: histogram.histogram_name())); On 2016/02/18 19:06:36, Alexei Svitkine wrote: > Nit: ...
4 years, 10 months ago (2016-02-18 19:33:55 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1485763002/510001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1485763002/510001
4 years, 10 months ago (2016-02-18 19:57:58 UTC) #33
commit-bot: I haz the power
Committed patchset #21 (id:510001)
4 years, 10 months ago (2016-02-18 21:22:23 UTC) #34
commit-bot: I haz the power
4 years, 10 months ago (2016-02-18 21:23:27 UTC) #36
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/c85a1f82ce2ab8c4ff9c19989f17234ea8abb865
Cr-Commit-Position: refs/heads/master@{#376264}

Powered by Google App Engine
This is Rietveld 408576698