Lines Matching refs:Histogram
9 #include "base/metrics/histogram.h"
19 // Each test will have a clean state (no Histogram / BucketRanges
37 Histogram* CreateHistogram(const std::string& name,
42 Histogram::InitializeBucketRanges(min, max, ranges);
45 return new Histogram(name, min, max, registered_ranges);
48 void DeleteHistogram(HistogramBase* histogram) {
49 delete histogram;
66 Histogram* histogram = CreateHistogram("TestHistogram", 1, 1000, 10);
69 EXPECT_EQ(histogram,
70 StatisticsRecorder::RegisterOrDeleteDuplicate(histogram));
71 // Manually delete histogram that was not registered.
72 DeleteHistogram(histogram);
122 // Create a Histogram that was not registered.
123 Histogram* histogram = CreateHistogram("TestHistogram", 1, 1000, 10);
129 // Register the Histogram.
130 EXPECT_EQ(histogram,
131 StatisticsRecorder::RegisterOrDeleteDuplicate(histogram));
135 // Register the same Histogram again.
136 EXPECT_EQ(histogram,
137 StatisticsRecorder::RegisterOrDeleteDuplicate(histogram));
144 HistogramBase* histogram1 = Histogram::FactoryGet(
146 HistogramBase* histogram2 = Histogram::FactoryGet(
155 Histogram::FactoryGet("TestHistogram1", 1, 1000, 10, Histogram::kNoFlags);
156 Histogram::FactoryGet("TestHistogram2", 1, 1000, 10, Histogram::kNoFlags);
157 Histogram::FactoryGet("TestHistogram3", 1, 1000, 10, Histogram::kNoFlags);
178 // Create a histogram.
179 HistogramBase* histogram = Histogram::FactoryGet(
185 // Get an existing histogram.
186 HistogramBase* histogram2 = Histogram::FactoryGet(
191 EXPECT_EQ(histogram, histogram2);
194 histogram = LinearHistogram::FactoryGet(
201 histogram = BooleanHistogram::FactoryGet(
211 histogram = CustomHistogram::FactoryGet(
221 HistogramBase* histogram = Histogram::FactoryGet(
224 // The histogram we got from macro is the same as from FactoryGet.
229 EXPECT_EQ(histogram, registered_histograms[0]);
244 Histogram::FactoryGet("Histogram", 1, 64, 8, HistogramBase::kNoFlags);
245 Histogram::FactoryGet("Histogram2", 1, 64, 8, HistogramBase::kNoFlags);
250 Histogram::FactoryGet("Histogram3", 1, 64, 16, HistogramBase::kNoFlags);
280 // Examine the first histogram.