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

Issue 10834011: Refactor of Histogram related code (Closed)

Created:
8 years, 5 months ago by kaiwang
Modified:
8 years, 4 months ago
CC:
chromium-reviews, erikwright (departed), MAD, Ilya Sherman, jar (doing other things), brettw-cc_chromium.org
Visibility:
Public.

Description

This is a major refactor of Histogram related code: 1. Remove duplicated code from histogram.h/.cc, including validating related code and BucketRanges related. 2. Constness of BucketRanges from Histograms, to prevent accidentally modification and provide a simpler interface. 3. Add/move tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149495

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 67

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1058 lines, -995 lines) Patch
M base/base.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/metrics/bucket_ranges.h View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M base/metrics/bucket_ranges.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M base/metrics/bucket_ranges_unittest.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M base/metrics/histogram.h View 1 2 3 4 5 6 17 chunks +89 lines, -89 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 5 6 24 chunks +375 lines, -495 lines 2 comments Download
M base/metrics/histogram_base.h View 1 chunk +1 line, -1 line 0 comments Download
M base/metrics/histogram_base.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M base/metrics/histogram_snapshot_manager.cc View 1 chunk +2 lines, -1 line 0 comments Download
M base/metrics/histogram_unittest.cc View 1 2 3 4 5 6 6 chunks +134 lines, -264 lines 0 comments Download
M base/metrics/statistics_recorder.h View 1 2 3 4 5 6 4 chunks +19 lines, -21 lines 0 comments Download
M base/metrics/statistics_recorder.cc View 1 2 3 4 5 6 7 7 chunks +142 lines, -98 lines 0 comments Download
A base/metrics/statistics_recorder_unittest.cc View 1 2 3 4 5 6 1 chunk +256 lines, -0 lines 0 comments Download
M chrome/common/metrics/metrics_log_base.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/child_histogram_message_filter.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/disk_cache/stats_histogram.h View 2 chunks +5 lines, -4 lines 0 comments Download
M net/disk_cache/stats_histogram.cc View 2 chunks +1 line, -11 lines 0 comments Download
M net/socket_stream/socket_stream_metrics_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M net/url_request/url_request_throttler_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
kaiwang
I'm still adding some test to this change. But it is a quite big change, ...
8 years, 5 months ago (2012-07-26 01:45:48 UTC) #1
jam
On 2012/07/26 01:45:48, kaiwang wrote: > I'm still adding some test to this change. > ...
8 years, 5 months ago (2012-07-26 21:56:22 UTC) #2
kaiwang
Thanks! Seems some tests are really flaky and I think the errors are not caused ...
8 years, 4 months ago (2012-07-27 19:47:39 UTC) #3
jar (doing other things)
http://codereview.chromium.org/10834011/diff/12/base/metrics/histogram.cc File base/metrics/histogram.cc (left): http://codereview.chromium.org/10834011/diff/12/base/metrics/histogram.cc#oldcode319 base/metrics/histogram.cc:319: DCHECK_EQ(render_histogram->range_checksum(), range_checksum); Perhaps this should be preserved, induce a ...
8 years, 4 months ago (2012-08-01 00:26:10 UTC) #4
kaiwang
http://codereview.chromium.org/10834011/diff/12/base/metrics/histogram.cc File base/metrics/histogram.cc (left): http://codereview.chromium.org/10834011/diff/12/base/metrics/histogram.cc#oldcode319 base/metrics/histogram.cc:319: DCHECK_EQ(render_histogram->range_checksum(), range_checksum); On 2012/08/01 00:26:10, jar wrote: > Perhaps ...
8 years, 4 months ago (2012-08-01 04:13:20 UTC) #5
jar (doing other things)
With changes listed below, LGTM. http://codereview.chromium.org/10834011/diff/1027/base/metrics/statistics_recorder.cc File base/metrics/statistics_recorder.cc (right): http://codereview.chromium.org/10834011/diff/1027/base/metrics/statistics_recorder.cc#newcode97 base/metrics/statistics_recorder.cc:97: scoped_ptr<const BucketRanges> ranges_deleter(ranges); IMO, ...
8 years, 4 months ago (2012-08-01 16:41:25 UTC) #6
kaiwang
http://codereview.chromium.org/10834011/diff/1027/base/metrics/statistics_recorder.cc File base/metrics/statistics_recorder.cc (right): http://codereview.chromium.org/10834011/diff/1027/base/metrics/statistics_recorder.cc#newcode97 base/metrics/statistics_recorder.cc:97: scoped_ptr<const BucketRanges> ranges_deleter(ranges); On 2012/08/01 16:41:25, jar wrote: > ...
8 years, 4 months ago (2012-08-01 19:48:18 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kaiwang@chromium.org/10834011/2014
8 years, 4 months ago (2012-08-01 19:50:59 UTC) #8
commit-bot: I haz the power
Change committed as 149495
8 years, 4 months ago (2012-08-01 21:34:09 UTC) #9
jar (doing other things)
lgtm
8 years, 4 months ago (2012-08-01 22:56:17 UTC) #10
Lei Zhang
https://chromiumcodereview.appspot.com/10834011/diff/2014/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://chromiumcodereview.appspot.com/10834011/diff/2014/base/metrics/histogram.cc#newcode461 base/metrics/histogram.cc:461: DLOG(WARNING) << "Histogram: " << name << " Bad ...
8 years, 4 months ago (2012-08-02 04:20:49 UTC) #11
Lei Zhang
8 years, 4 months ago (2012-08-02 04:22:52 UTC) #12
https://chromiumcodereview.appspot.com/10834011/diff/2014/base/metrics/histog...
File base/metrics/histogram.cc (right):

https://chromiumcodereview.appspot.com/10834011/diff/2014/base/metrics/histog...
base/metrics/histogram.cc:461: DLOG(WARNING) << "Histogram: " << name << " Bad
minimum: " << *minimum;
On 2012/08/02 04:20:50, Lei Zhang wrote:
> Does this have to be DLOG? Can you use a DVLOG instead? My debug build
suddenly
> got very spammy. :(

Already fixed in r149541. Yay! :)

Powered by Google App Engine
This is Rietveld 408576698