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

Issue 1256363002: Add support to increase a UMA histogram bucket by an aribitrary integer. (Closed)

Created:
5 years, 4 months ago by amohammadkhan
Modified:
5 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, 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

Add support to increase a UMA histogram bucket by an aribitrary integer. The UMA code supports counting events that fall into ranges (buckets), and this is implemented by adding 1 to the count for particular range. The change is to add an arbitrary amount to a bucket on a single event. To achieve this goal, we have added MultiAdd function to Histogram and SparseHistogram classes. So the user of these classes will be able to increase the count number of a bucket in these classes by an arbitrary integer instead of one which is hardcoded in their Add function. BUG=514317 Committed: https://crrev.com/6779b5c3bc0f026f503628c136f7bd02efd3e02e Cr-Commit-Position: refs/heads/master@{#341961}

Patch Set 1 #

Patch Set 2 #

Total comments: 2

Patch Set 3 : Change variable name and fix a typo #

Total comments: 12

Patch Set 4 : Replacing MultiAdd with AddCount #

Patch Set 5 : Fix a typo in comments. #

Patch Set 6 : Handling negative counts in sparse histograms. #

Total comments: 12

Patch Set 7 : Removing clamping function and adding zero condition for count. #

Patch Set 8 : Adding a blank line after DCHECKs #

Patch Set 9 : Fixing unittests. #

Total comments: 2

Patch Set 10 : Removing extra space and add comment about min count #

Patch Set 11 : After rebase-update #

Messages

Total messages: 20 (5 generated)
amohammadkhan
5 years, 4 months ago (2015-07-27 20:06:17 UTC) #2
amohammadkhan
On 2015/07/27 20:06:17, amohammadkhan wrote: Do I need to add checking for negative values of ...
5 years, 4 months ago (2015-07-27 20:11:11 UTC) #3
bengr
https://codereview.chromium.org/1256363002/diff/20001/base/metrics/histogram.h File base/metrics/histogram.h (right): https://codereview.chromium.org/1256363002/diff/20001/base/metrics/histogram.h#newcode184 base/metrics/histogram.h:184: void MultiAdd(Sample value, int repetition) override; Why the name ...
5 years, 4 months ago (2015-07-28 17:18:10 UTC) #4
amohammadkhan
On 2015/07/28 17:18:10, bengr wrote: > https://codereview.chromium.org/1256363002/diff/20001/base/metrics/histogram.h > File base/metrics/histogram.h (right): > > https://codereview.chromium.org/1256363002/diff/20001/base/metrics/histogram.h#newcode184 > ...
5 years, 4 months ago (2015-07-28 22:27:40 UTC) #6
bengr
asvitkine: PTAL.
5 years, 4 months ago (2015-07-31 15:32:52 UTC) #7
Alexei Svitkine (slow)
looks good generally, a few minor comments https://codereview.chromium.org/1256363002/diff/40001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1256363002/diff/40001/base/metrics/histogram.cc#newcode287 base/metrics/histogram.cc:287: void Histogram::MultiAdd(int ...
5 years, 4 months ago (2015-07-31 15:39:28 UTC) #8
amohammadkhan
https://codereview.chromium.org/1256363002/diff/40001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1256363002/diff/40001/base/metrics/histogram.cc#newcode287 base/metrics/histogram.cc:287: void Histogram::MultiAdd(int value, int count) { On 2015/07/31 15:39:27, ...
5 years, 4 months ago (2015-08-03 17:30:43 UTC) #9
Alexei Svitkine (slow)
https://codereview.chromium.org/1256363002/diff/100001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1256363002/diff/100001/base/metrics/histogram.cc#newcode274 base/metrics/histogram.cc:274: int ClampValue(int value) { Put this in the anon ...
5 years, 4 months ago (2015-08-03 18:15:43 UTC) #10
amohammadkhan
https://codereview.chromium.org/1256363002/diff/100001/base/metrics/histogram.cc File base/metrics/histogram.cc (right): https://codereview.chromium.org/1256363002/diff/100001/base/metrics/histogram.cc#newcode274 base/metrics/histogram.cc:274: int ClampValue(int value) { On 2015/08/03 18:15:42, Alexei Svitkine ...
5 years, 4 months ago (2015-08-04 18:22:52 UTC) #11
Alexei Svitkine (slow)
lgtm % comments https://codereview.chromium.org/1256363002/diff/160001/base/metrics/histogram_base.h File base/metrics/histogram_base.h (right): https://codereview.chromium.org/1256363002/diff/160001/base/metrics/histogram_base.h#newcode126 base/metrics/histogram_base.h:126: // function increases the |value| bucket ...
5 years, 4 months ago (2015-08-04 18:25:12 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256363002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256363002/200001
5 years, 4 months ago (2015-08-05 18:45:16 UTC) #16
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 4 months ago (2015-08-05 20:31:22 UTC) #17
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/6779b5c3bc0f026f503628c136f7bd02efd3e02e Cr-Commit-Position: refs/heads/master@{#341961}
5 years, 4 months ago (2015-08-05 20:32:08 UTC) #18
Lei Zhang
Is this causing all the memory.fyi bots to go red?
5 years, 4 months ago (2015-08-05 23:47:13 UTC) #19
amohammadkhan
5 years, 4 months ago (2015-08-06 00:19:25 UTC) #20
Message was sent while issue was closed.
On 2015/08/05 23:47:13, Lei Zhang wrote:
> Is this causing all the memory.fyi bots to go red?

I think it is an intentional leak for SampleMap and it needs to be suppressed.
But I am not completely sure because I am a new intern, so I am waiting for
opinion of my reviewers.

Powered by Google App Engine
This is Rietveld 408576698