Chromium Code Reviews| Index: base/metrics/histogram.h |
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h |
| index 9845362d98aa31cad7557383e2fc1e039ad5f67e..b67793d58d959244ef3eb47b52aef14413e18f3d 100644 |
| --- a/base/metrics/histogram.h |
| +++ b/base/metrics/histogram.h |
| @@ -346,12 +346,24 @@ class Lock; |
| base::BooleanHistogram::FactoryGet(name, \ |
| base::HistogramBase::kUmaTargetedHistogramFlag)) |
| +// This is a helper macro used by other macros and shouldn't be used directly. |
| +#define UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \ |
|
Ilya Sherman
2014/02/08 00:59:49
Please drop the UMA_ prefix from this name. UMA_
Kibeom Kim (inactive)
2014/02/10 22:24:45
Done.
|
| + STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |
| + base::LinearHistogram::FactoryGet(name, 1, boundary, boundary + 1, \ |
| + flag)) |
| + |
| // The samples should always be strictly less than |boundary_value|. For more |
| // details, see the comment for the |HISTOGRAM_ENUMERATION| macro, above. |
| #define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \ |
| - STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |
| - base::LinearHistogram::FactoryGet(name, 1, boundary_value, \ |
| - boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag)) |
| + UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \ |
| + base::HistogramBase::kUmaTargetedHistogramFlag) |
| + |
| +// In addition to UMA_HISTOGRAM_ENUMERATION, this adds |kStabilityHistogramFlag| |
| +// to the histogram. Use this if you are recording stability histogram, that |
| +// should be a part of the initial stability log. |
|
Ilya Sherman
2014/02/08 00:59:49
nit: Minor suggested phrasing tweaks:
"Similar to
Kibeom Kim (inactive)
2014/02/10 22:24:45
Done.
|
| +#define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \ |
| + UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \ |
| + base::HistogramBase::kUmaStabilityHistogramFlag) |
| #define UMA_HISTOGRAM_CUSTOM_ENUMERATION(name, sample, custom_ranges) \ |
| STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |