Index: base/test/histogram_tester.h |
diff --git a/base/test/histogram_tester.h b/base/test/histogram_tester.h |
index ecf33f831f0d1844531821a5face3c01ff30b198..682e8f6b9bf8735b8e2883f02e4e9d0617f4501f 100644 |
--- a/base/test/histogram_tester.h |
+++ b/base/test/histogram_tester.h |
@@ -54,6 +54,12 @@ class HistogramTester { |
void ExpectTotalCount(const std::string& name, |
HistogramBase::Count count) const; |
+ // This tests total count of a given histogram, excluding one bucket, given |
+ // the sample id. |
+ void ExpectTotalCountExcept(const std::string& name, |
+ HistogramBase::Sample sample, |
Nico
2017/05/09 19:36:46
s/sample/except/
lunalu1
2017/05/10 19:39:38
Done.
|
+ HistogramBase::Count count) const; |
+ |
// We know exact number of samples for buckets corresponding to a time |
// interval. Other intervals may have samples too. |
void ExpectTimeBucketCount(const std::string& name, |
@@ -119,6 +125,16 @@ class HistogramTester { |
Histogram::Count expected_count, |
const HistogramSamples& samples) const; |
+ // Verifies that the total number of values recorded for the histogram |name|, |
+ // excluding the value in the |sample| bucket, matches the |expected_count|. |
+ // The histogram's current total counts and its bucket's current value is |
+ // determined from |samples| and is modified based on the snapshot restored |
+ // for histogram |name|. |
Alexei Svitkine (slow)
2017/05/10 15:17:30
I wonder if it wouldn't be better to just have fun
lunalu1
2017/05/10 19:39:38
That was my initial thought. But after seeing that
Alexei Svitkine (slow)
2017/05/10 19:45:19
I agree that it would be different with how the cl
|
+ void CheckTotalCountExcept(const std::string& name, |
+ HistogramBase::Sample sample, |
Nico
2017/05/09 19:36:46
I'd s/sample/except/ here too
lunalu1
2017/05/10 19:39:38
Done.
|
+ Histogram::Count expected_count, |
+ const HistogramSamples& samples) const; |
+ |
// Used to determine the histogram changes made during this instance's |
// lifecycle. |
std::map<std::string, std::unique_ptr<HistogramSamples>> histograms_snapshot_; |