Chromium Code Reviews| Index: base/metrics/histogram_macros.h |
| diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h |
| index 9cb21ec563a2ed54e45cdd885b4d2501a84ad985..e768712f63546e135c1d063352f3b741feb4fad4 100644 |
| --- a/base/metrics/histogram_macros.h |
| +++ b/base/metrics/histogram_macros.h |
| @@ -53,17 +53,27 @@ |
| base::HistogramBase::kUmaTargetedHistogramFlag)) |
| //------------------------------------------------------------------------------ |
| -// Percentage histograms. |
| +// Linear histograms. |
| // All of these macros must be called with |name| as a runtime constant. |
| +// Used for capturing integer data with a linear bucketing scheme. This can be |
| +// used when you want the exact value of some small numeric count, with a max of |
| +// 100 or less. If you need to capture a range of greater than 100, we recommend |
| +// the use of the COUNT histograms below. |
| + |
| +// Sample usage: |
| +// UMA_HISTOGRAM_EXACT_LINEAR("Histogram.Linear", count, 10); |
| +#define UMA_HISTOGRAM_EXACT_LINEAR(name, sample, value_max) \ |
| + UMA_HISTOGRAM_ENUMERATION(name, sample, value_max) |
|
Mark P
2016/10/03 17:42:29
Should we make this value_max+1 to better detect c
rkaplow
2016/10/03 19:19:44
sure, that sounds good, although we do want to do
|
| + |
| + |
|
Mark P
2016/10/03 17:42:29
optional nit: remove one black line
|
| // Used for capturing basic percentages. This will be 100 buckets of size 1. |
| // Sample usage: |
| // UMA_HISTOGRAM_PERCENTAGE("Histogram.Percent", percent_as_int); |
| -#define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \ |
| - UMA_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101) |
| - |
| +#define UMA_HISTOGRAM_PERCENTAGE(name, percent_as_int) \ |
| + UMA_HISTOGRAM_ENUMERATION(name, percent_as_int, 101) |
| //------------------------------------------------------------------------------ |
| // Count histograms. These are used for collecting numeric data. Note that we |
| @@ -117,7 +127,6 @@ |
| name, sample, min, max, bucket_count, \ |
| base::HistogramBase::kUmaTargetedHistogramFlag) |
| - |
| //------------------------------------------------------------------------------ |
| // Timing histograms. These are used for collecting timing data (generally |
| // latencies). |