Chromium Code Reviews| Index: base/metrics/bucket_ranges.h |
| diff --git a/base/metrics/bucket_ranges.h b/base/metrics/bucket_ranges.h |
| index 210b9a7e510a9efea40196248e78c7a5e0502d28..4b07b57eb08c841e22ce700a3c504c0545a20bcc 100644 |
| --- a/base/metrics/bucket_ranges.h |
| +++ b/base/metrics/bucket_ranges.h |
| @@ -39,6 +39,12 @@ class BASE_EXPORT BucketRanges { |
| uint32 checksum() const { return checksum_; } |
| void set_checksum(uint32 checksum) { checksum_ = checksum; } |
| + // A bucket is defined by a consecutive pair of entries in |ranges|, so there |
| + // is one fewer bucket than there are ranges. For example, if |ranges| is |
| + // [0, 1, 3, 7, INT_MAX], then the buckets in this histogram are |
| + // [0, 1), [1, 3), [3, 7), and [7, INT_MAX). |
| + size_t BucketCount() const { return ranges_.size() - 1; } |
|
Alexei Svitkine (slow)
2013/06/20 05:53:32
Drive by nit:
This should probably either use hac
Ilya Sherman
2013/06/20 05:57:34
I don't have a strong preference. Jim, which of t
jar (doing other things)
2013/06/20 16:41:18
I was a little tentative about the cost... but I g
Ilya Sherman
2013/06/21 04:03:05
Done.
|
| + |
| // Checksum methods to verify whether the ranges are corrupted (e.g. bad |
| // memory access). |
| uint32 CalculateChecksum() const; |