Chromium Code Reviews| Index: base/metrics/histogram.h |
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h |
| index 9845362d98aa31cad7557383e2fc1e039ad5f67e..29385dc86de99bd188cd7b3a9896d9bb112283dd 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_value, flag) \ |
|
Alexei Svitkine (slow)
2014/01/29 16:54:09
Nit: Seems this goes over the 80 char limit. Maybe
Kibeom Kim (inactive)
2014/01/29 20:16:07
Done.
|
| + STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |
| + base::LinearHistogram::FactoryGet(name, 1, boundary_value, \ |
| + boundary_value + 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. |
| +#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), \ |