diff options
author | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 01:47:49 +0000 |
---|---|---|
committer | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 01:47:49 +0000 |
commit | 5ecb9702bdd7ea770471079e4cafa8fc9dc9c356 (patch) | |
tree | a8d69afa61f96c6dc9a4566305fcd34701c91144 /base/metrics | |
parent | a3b67535aaf7930d9496ff41302ffde2b22a91f7 (diff) | |
download | chromium_src-5ecb9702bdd7ea770471079e4cafa8fc9dc9c356.zip chromium_src-5ecb9702bdd7ea770471079e4cafa8fc9dc9c356.tar.gz chromium_src-5ecb9702bdd7ea770471079e4cafa8fc9dc9c356.tar.bz2 |
Incrementally make base histograms like UMA histograms.
Over in related https://codereview.chromium.org/11649028/ , I had to add HISTOGRAM_BOOLEAN. It's not right that UMA_HISTOGRAM_* and HISTOGRAM_* are not the same. This CL doesn't fix that, but it does at least make things less bad.
R=isherman@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/11794020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/metrics')
-rw-r--r-- | base/metrics/histogram.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h index 24585b7..02a975c 100644 --- a/base/metrics/histogram.h +++ b/base/metrics/histogram.h @@ -168,6 +168,13 @@ class Lock; name, sample, base::TimeDelta::FromMilliseconds(1), \ base::TimeDelta::FromSeconds(10), 50) +// For folks that need real specific times, use this to select a precise range +// of times you want plotted, and the number of buckets you want used. +#define HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \ + STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \ + base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \ + base::HistogramBase::kNoFlags)) + #define HISTOGRAM_COUNTS(name, sample) HISTOGRAM_CUSTOM_COUNTS( \ name, sample, 1, 1000000, 50) @@ -185,12 +192,9 @@ class Lock; #define HISTOGRAM_PERCENTAGE(name, under_one_hundred) \ HISTOGRAM_ENUMERATION(name, under_one_hundred, 101) -// For folks that need real specific times, use this to select a precise range -// of times you want plotted, and the number of buckets you want used. -#define HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \ - STATIC_HISTOGRAM_POINTER_BLOCK(name, AddTime(sample), \ - base::Histogram::FactoryTimeGet(name, min, max, bucket_count, \ - base::HistogramBase::kNoFlags)) +#define HISTOGRAM_BOOLEAN(name, sample) \ + STATIC_HISTOGRAM_POINTER_BLOCK(name, AddBoolean(sample), \ + base::BooleanHistogram::FactoryGet(name, base::Histogram::kNoFlags)) // Support histograming of an enumerated value. The samples should always be // strictly less than |boundary_value| -- this prevents you from running into |