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

Unified Diff: base/test/histogram_tester.h

Issue 1177263004: Add HistogramTester::GetAllSamples. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GetAllSamples() and test. Created 5 years, 6 months 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
« no previous file with comments | « no previous file | base/test/histogram_tester.cc » ('j') | base/test/histogram_tester_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/histogram_tester.h
diff --git a/base/test/histogram_tester.h b/base/test/histogram_tester.h
index 96317f98d2d33283ed09a8d3e69487312af1dd38..d06efcdaf26f4547c8fc7c27f7901344ca71a755 100644
--- a/base/test/histogram_tester.h
+++ b/base/test/histogram_tester.h
@@ -7,6 +7,8 @@
#include <map>
#include <string>
+#include <utility>
+#include <vector>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
@@ -47,6 +49,12 @@ class HistogramTester {
void ExpectTotalCount(const std::string& name,
base::HistogramBase::Count count) const;
+ // Returns a list of all of the buckets recorded since creation of this
+ // object, as pair<Sample, Count>, where the Sample is the min boundary of the
+ // bucket and the Count is the count recorded since creation.
ncarter (slow) 2015/06/24 17:28:44 This comment should have code showing the example
twifkak 2015/06/25 20:21:38 Done.
+ std::vector<std::pair<HistogramBase::Sample, HistogramBase::Count>>
+ GetAllSamples(const std::string& name);
+
// Access a modified HistogramSamples containing only what has been logged
// to the histogram since the creation of this object.
scoped_ptr<HistogramSamples> GetHistogramSamplesSinceCreation(
« no previous file with comments | « no previous file | base/test/histogram_tester.cc » ('j') | base/test/histogram_tester_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698