diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-20 22:32:51 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-20 22:32:51 +0000 |
commit | 978077e09aef57e064f27b61808aeb3856c085a9 (patch) | |
tree | 688b4f4077f25216d76446cf74e7e7c254b7c2bb /base/histogram.h | |
parent | a23aab644c2dfb5eb5d33a730c076c5cbeb5e365 (diff) | |
download | chromium_src-978077e09aef57e064f27b61808aeb3856c085a9.zip chromium_src-978077e09aef57e064f27b61808aeb3856c085a9.tar.gz chromium_src-978077e09aef57e064f27b61808aeb3856c085a9.tar.bz2 |
Get correct request to finsh time for histogram
Corrected a typo in generating the stat, and evolved to a new histogram
name to avoid confusion.
Note that the time between start and finish still needs to be
fixed, as that part of the regression is not handled.
BUG=14678
r=davemoore
Review URL: http://codereview.chromium.org/132072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/histogram.h')
-rw-r--r-- | base/histogram.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/base/histogram.h b/base/histogram.h index 3a3ddb1..d63263e 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -68,8 +68,14 @@ 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). +// 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) do { \ + static Histogram counter((name), min, max, bucket_count); \ + counter.AddTime(sample); \ + } while (0) + +// DO NOT USE THIS. It is being phased out, in favor of HISTOGRAM_CUSTOM_TIMES. #define HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) do { \ static Histogram counter((name), min, max, bucket_count); \ if ((sample) < (max)) counter.AddTime(sample); \ @@ -108,6 +114,8 @@ sample) #define DHISTOGRAM_PERCENTAGE(name, under_one_hundred) HISTOGRAM_PERCENTAGE(\ name, under_one_hundred) +#define DHISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) \ + 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) @@ -117,6 +125,8 @@ #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_CUSTOM_TIMES(name, sample, min, max, bucket_count) \ + do {} while (0) #define DHISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) \ do {} while (0) @@ -157,6 +167,12 @@ static const int kRendererHistogramFlag = 1 << 4; counter.AddTime(sample); \ } while (0) +#define UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, min, max, bucket_count) do { \ + static Histogram counter((name), min, max, bucket_count); \ + counter.SetFlags(kUmaTargetedHistogramFlag); \ + counter.AddTime(sample); \ + } while (0) + #define UMA_HISTOGRAM_CLIPPED_TIMES(name, sample, min, max, bucket_count) do { \ static Histogram counter((name), min, max, bucket_count); \ counter.SetFlags(kUmaTargetedHistogramFlag); \ |