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

Unified Diff: base/metrics/histogram_base.h

Issue 1256363002: Add support to increase a UMA histogram bucket by an aribitrary integer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After rebase-update Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_base.h
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
index 1bc1f6eb6fe78bf4a48576f60e3da694a74da932..304e3e03b6b16d160225d5d1e41b49b903d62d91 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -121,6 +121,12 @@ class BASE_EXPORT HistogramBase {
virtual void Add(Sample value) = 0;
+ // In Add function the |value| bucket is increased by one, but in some use
+ // cases we need to increase this value by an arbitrary integer. AddCount
+ // function increases the |value| bucket by |count|. |count| should be greater
+ // than or equal to 1.
+ virtual void AddCount(Sample value, int count) = 0;
+
// 2 convenient functions that call Add(Sample).
void AddTime(const TimeDelta& time);
void AddBoolean(bool value);
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698