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

Unified Diff: base/test/histogram_tester.h

Issue 2393493002: Expose macros from base/metrics/histogram_macros.h as functions (Closed)
Patch Set: Add Histogram functions API implementation and tests 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..ec10e3763ea690c94aed8fc15b087189e62bf8ca 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,
+ const base::TimeDelta& sample,
Alexei Svitkine (slow) 2016/11/12 00:51:14 Nit: I think base::TimeDelta should be passed by v
nikunjb 2016/11/12 01:35:15 Done. Also fixed the TimeDelta used in histogram_f
+ 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