diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 21:19:55 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 21:19:55 +0000 |
commit | 26d3857c6d85fc760ecf61276b5ffd6c61199a14 (patch) | |
tree | 51915c13c3e9c4c4ad748198f2f418658c039fc5 /base/histogram.h | |
parent | 4639f17fd36f6eb1dea14c81ff01d94bdca0e39f (diff) | |
download | chromium_src-26d3857c6d85fc760ecf61276b5ffd6c61199a14.zip chromium_src-26d3857c6d85fc760ecf61276b5ffd6c61199a14.tar.gz chromium_src-26d3857c6d85fc760ecf61276b5ffd6c61199a14.tar.bz2 |
Add a new histogram macro to replace a few explicit calls.
There is no real change in functionality.
Review URL: http://codereview.chromium.org/42514
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/histogram.h')
-rw-r--r-- | base/histogram.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/base/histogram.h b/base/histogram.h index 7c4b3b8..f189a06 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -41,7 +41,7 @@ //------------------------------------------------------------------------------ // Provide easy general purpose histogram in a macro, just like stats counters. -// The first two macros use 50 buckets. +// The first four macros use 50 buckets. #define HISTOGRAM_TIMES(name, sample) do { \ static Histogram counter((name), base::TimeDelta::FromMilliseconds(1), \ @@ -59,6 +59,11 @@ counter.Add(sample); \ } while (0) +#define HISTOGRAM_COUNTS_10000(name, sample) do { \ + static Histogram counter((name), 1, 10000, 50); \ + 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); \ @@ -171,6 +176,12 @@ static const int kRendererHistogramFlag = 1 << 4; counter.Add(sample); \ } while (0) +#define UMA_HISTOGRAM_COUNTS_10000(name, sample) do { \ + static Histogram counter((name), 1, 10000, 50); \ + 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); \ |