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

Unified Diff: base/histogram.h

Issue 149119: Create a more fine grained histogram of SDCH payload sizes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « no previous file | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/histogram.h
===================================================================
--- base/histogram.h (revision 19463)
+++ base/histogram.h (working copy)
@@ -63,6 +63,11 @@
counter.Add(sample); \
} while (0)
+#define HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) do { \
+ static Histogram counter((name), min, max, bucket_count); \
+ counter.Add(sample); \
+ } while (0)
+
#define HISTOGRAM_PERCENTAGE(name, under_one_hundred) do { \
static LinearHistogram counter((name), 1, 100, 101); \
counter.Add(under_one_hundred); \
@@ -118,6 +123,8 @@
HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count)
#define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \
HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count)
+#define DHISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) \
+ HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count)
#else // NDEBUG
@@ -129,7 +136,10 @@
do {} while (0)
#define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \
do {} while (0)
+#define DHISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) \
+ do {} while (0)
+
#endif // NDEBUG
//------------------------------------------------------------------------------
@@ -197,6 +207,12 @@
counter.Add(sample); \
} while (0)
+#define UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) do { \
+ static Histogram counter((name), min, max, bucket_count); \
+ counter.SetFlags(kUmaTargetedHistogramFlag); \
+ counter.Add(sample); \
+ } while (0)
+
#define UMA_HISTOGRAM_MEMORY_KB(name, sample) do { \
static Histogram counter((name), 1000, 500000, 50); \
counter.SetFlags(kUmaTargetedHistogramFlag); \
« no previous file with comments | « no previous file | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698