Chromium Code Reviews| Index: base/metrics/histogram_macros.h |
| diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h |
| index dcde7255c8dafee8e28c09e21baf492408ea8682..4850e195ebace18901edfdb2ea5fa0c002ae4426 100644 |
| --- a/base/metrics/histogram_macros.h |
| +++ b/base/metrics/histogram_macros.h |
| @@ -229,9 +229,24 @@ |
| name, sample, 1, 10000, 50) |
| #define UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, bucket_count) \ |
| - STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \ |
| - base::Histogram::FactoryGet(name, min, max, bucket_count, \ |
| - base::HistogramBase::kUmaTargetedHistogramFlag)) |
| + UMA_HISTOGRAM_CUSTOM_COUNTS_WITH_FLAG( \ |
| + name, sample, min, max, bucket_count, \ |
| + base::HistogramBase::kUmaTargetedHistogramFlag) |
| + |
| +#define UMA_STABILITY_HISTOGRAM_COUNTS_100(name, sample) \ |
| + UMA_STABILITY_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 100, 50) |
| + |
| +#define UMA_STABILITY_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, \ |
| + bucket_count) \ |
| + UMA_HISTOGRAM_CUSTOM_COUNTS_WITH_FLAG( \ |
| + name, sample, min, max, bucket_count, \ |
| + base::HistogramBase::kUmaStabilityHistogramFlag) |
| + |
| +#define UMA_HISTOGRAM_CUSTOM_COUNTS_WITH_FLAG(name, sample, min, max, \ |
|
Alexei Svitkine (slow)
2016/09/08 18:41:12
Nit: Don't use UMA_ prefix here since the kUma fla
manzagop (departed)
2016/09/08 20:54:30
Done.
Also rewrote LOCAL_HISTOGRAM_CUSTOM_COUNTS
|
| + bucket_count, flag) \ |
| + STATIC_HISTOGRAM_POINTER_BLOCK( \ |
| + name, Add(sample), \ |
| + base::Histogram::FactoryGet(name, min, max, bucket_count, flag)) |
| #define UMA_HISTOGRAM_MEMORY_KB(name, sample) UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
| name, sample, 1000, 500000, 50) |