Chromium Code Reviews| Index: base/metrics/histogram.h |
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h |
| index 503d246379c01099fe91b1447587c56ccfb0b5bf..10e06c5516d03ac6b498a109b2b15303eff1d11b 100644 |
| --- a/base/metrics/histogram.h |
| +++ b/base/metrics/histogram.h |
| @@ -267,6 +267,9 @@ class BASE_EXPORT Histogram : public HistogramBase { |
| // Implementation of SnapshotSamples function. |
| std::unique_ptr<SampleVector> SnapshotSampleVector() const; |
|
Alexei Svitkine (slow)
2017/05/10 16:55:38
While you're here, probably worth renaming this an
altimin
2017/05/11 12:38:33
Done.
|
| + // Create a copy of unlogged samples. |
| + std::unique_ptr<SampleVector> SnapshotUnloggedSamples() const; |
| + |
| //---------------------------------------------------------------------------- |
| // Helpers for emitting Ascii graphic. Each method appends data to output. |
| @@ -303,11 +306,10 @@ class BASE_EXPORT Histogram : public HistogramBase { |
| Sample declared_min_; // Less than this goes into the first bucket. |
| Sample declared_max_; // Over this goes into the last bucket. |
| - // Finally, provide the state that changes with the addition of each new |
| - // sample. |
| - std::unique_ptr<SampleVectorBase> samples_; |
| + // Samples that have not yet been logged with SnapshotDelta(). |
| + std::unique_ptr<HistogramSamples> unlogged_samples_; |
| - // Also keep a previous uploaded state for calculating deltas. |
| + // Accumulation of all samples that have logged with SnapshotDelta(). |
|
Alexei Svitkine (slow)
2017/05/10 16:55:38
Nit: "that have been logged" or "that were logged"
altimin
2017/05/11 12:38:33
Done.
|
| std::unique_ptr<HistogramSamples> logged_samples_; |
| // Flag to indicate if PrepareFinalDelta has been previously called. It is |