OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // SampleVector implements HistogramSamples interface. It is used by all | 5 // SampleVector implements HistogramSamples interface. It is used by all |
6 // Histogram based classes to store samples. | 6 // Histogram based classes to store samples. |
7 | 7 |
8 #ifndef BASE_METRICS_SAMPLE_VECTOR_H_ | 8 #ifndef BASE_METRICS_SAMPLE_VECTOR_H_ |
9 #define BASE_METRICS_SAMPLE_VECTOR_H_ | 9 #define BASE_METRICS_SAMPLE_VECTOR_H_ |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "base/metrics/histogram_base.h" | 22 #include "base/metrics/histogram_base.h" |
23 #include "base/metrics/histogram_samples.h" | 23 #include "base/metrics/histogram_samples.h" |
24 #include "base/metrics/persistent_memory_allocator.h" | 24 #include "base/metrics/persistent_memory_allocator.h" |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 | 27 |
28 class BucketRanges; | 28 class BucketRanges; |
29 | 29 |
30 class BASE_EXPORT SampleVectorBase : public HistogramSamples { | 30 class BASE_EXPORT SampleVectorBase : public HistogramSamples { |
31 public: | 31 public: |
32 SampleVectorBase(uint64_t id, const BucketRanges* bucket_ranges); | |
33 SampleVectorBase(uint64_t id, | 32 SampleVectorBase(uint64_t id, |
34 Metadata* meta, | 33 Metadata* meta, |
35 const BucketRanges* bucket_ranges); | 34 const BucketRanges* bucket_ranges); |
36 ~SampleVectorBase() override; | 35 ~SampleVectorBase() override; |
37 | 36 |
38 // HistogramSamples: | 37 // HistogramSamples: |
39 void Accumulate(HistogramBase::Sample value, | 38 void Accumulate(HistogramBase::Sample value, |
40 HistogramBase::Count count) override; | 39 HistogramBase::Count count) override; |
41 HistogramBase::Count GetCount(HistogramBase::Sample value) const override; | 40 HistogramBase::Count GetCount(HistogramBase::Sample value) const override; |
42 HistogramBase::Count TotalCount() const override; | 41 HistogramBase::Count TotalCount() const override; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 const HistogramBase::AtomicCount* counts_; | 173 const HistogramBase::AtomicCount* counts_; |
175 size_t counts_size_; | 174 size_t counts_size_; |
176 const BucketRanges* bucket_ranges_; | 175 const BucketRanges* bucket_ranges_; |
177 | 176 |
178 size_t index_; | 177 size_t index_; |
179 }; | 178 }; |
180 | 179 |
181 } // namespace base | 180 } // namespace base |
182 | 181 |
183 #endif // BASE_METRICS_SAMPLE_VECTOR_H_ | 182 #endif // BASE_METRICS_SAMPLE_VECTOR_H_ |
OLD | NEW |