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

Unified Diff: base/histogram.h

Issue 40319: Use filter context to track stats better in SDCH filtering (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | chrome/browser/automation/url_request_mock_http_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 11636)
+++ base/histogram.h (working copy)
@@ -60,6 +60,11 @@
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); \
+ } while (0)
+
// For folks that need real specific times, use this, but you'll only get
// samples that are in the range (overly large samples are discarded).
#define HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) do { \
@@ -98,6 +103,8 @@
#define DHISTOGRAM_COUNTS(name, sample) HISTOGRAM_COUNTS(name, sample)
#define DASSET_HISTOGRAM_COUNTS(name, sample) ASSET_HISTOGRAM_COUNTS(name, \
sample)
+#define DHISTOGRAM_PERCENTAGE(name, under_one_hundred) HISTOGRAM_PERCENTAGE(\
+ name, under_one_hundred)
#define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \
HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count)
@@ -106,6 +113,7 @@
#define DHISTOGRAM_TIMES(name, sample) do {} while (0)
#define DHISTOGRAM_COUNTS(name, sample) do {} while (0)
#define DASSET_HISTOGRAM_COUNTS(name, sample) do {} while (0)
+#define DHISTOGRAM_PERCENTAGE(name, under_one_hundred) do {} while (0)
#define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \
do {} while (0)
@@ -176,6 +184,12 @@
counter.Add(sample); \
} while (0)
+#define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) do { \
+ static LinearHistogram counter((name), 1, 100, 101); \
+ counter.SetFlags(kUmaTargetedHistogramFlag); \
+ counter.Add(under_one_hundred); \
+ } while (0)
+
//------------------------------------------------------------------------------
class Histogram : public StatsRate {
« no previous file with comments | « no previous file | chrome/browser/automation/url_request_mock_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698