Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: base/test/histogram_tester.h

Issue 2393493002: Expose macros from base/metrics/histogram_macros.h as functions (Closed)
Patch Set: Review comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/test/histogram_tester.h
diff --git a/base/test/histogram_tester.h b/base/test/histogram_tester.h
index cd8534acd459a852df936aeb0e6a7cb8514c6482..55ca1b9e0bf6a16a943f4839e91975988b9d4b70 100644
--- a/base/test/histogram_tester.h
+++ b/base/test/histogram_tester.h
@@ -15,6 +15,7 @@
#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_base.h"
+#include "base/time/time.h"
namespace base {
@@ -53,6 +54,12 @@ class HistogramTester {
void ExpectTotalCount(const std::string& name,
base::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,
+ base::TimeDelta sample,
+ base::HistogramBase::Count count) const;
+
// Returns a list of all of the buckets recorded since creation of this
// object, as vector<Bucket>, where the Bucket represents the min boundary of
// the bucket and the count of samples recorded to that bucket since creation.

Powered by Google App Engine
This is Rietveld 408576698