Lines Matching defs:histogram

5 #include "base/metrics/histogram.h"
31 // for histogram allocation. False will allocate histograms from the process
67 // By getting the results-histogram before any persistent allocator
68 // is attached, that histogram is guaranteed not to be stored in
99 HistogramBase* histogram = Histogram::FactoryGet(
101 EXPECT_TRUE(histogram);
142 HistogramBase* histogram = LinearHistogram::FactoryGet(
145 std::unique_ptr<HistogramSamples> samples = histogram->SnapshotSamples();
152 HistogramBase* histogram =
155 histogram->Add(1);
156 histogram->Add(10);
157 histogram->Add(50);
159 std::unique_ptr<HistogramSamples> samples = histogram->SnapshotDelta();
166 samples = histogram->SnapshotDelta();
169 histogram->Add(10);
170 histogram->Add(10);
171 samples = histogram->SnapshotDelta();
175 samples = histogram->SnapshotDelta();
181 HistogramBase* histogram =
184 histogram->Add(1);
185 histogram->Add(10);
186 histogram->Add(50);
188 std::unique_ptr<HistogramSamples> samples = histogram->SnapshotDelta();
195 histogram->Add(2);
196 histogram->Add(50);
198 samples = histogram->SnapshotFinalDelta();
218 Histogram* histogram = static_cast<Histogram*>(
220 EXPECT_TRUE(ranges.Equals(histogram->bucket_ranges()));
259 Histogram* histogram = static_cast<Histogram*>(
261 EXPECT_TRUE(ranges.Equals(histogram->bucket_ranges()));
297 Histogram* histogram = static_cast<Histogram*>(
300 const BucketRanges* ranges = histogram->bucket_ranges();
311 histogram = static_cast<Histogram*>(
314 ranges = histogram->bucket_ranges();
326 histogram = static_cast<Histogram*>(
329 ranges = histogram->bucket_ranges();
346 Histogram* histogram = static_cast<Histogram*>(
349 const BucketRanges* ranges = histogram->bucket_ranges();
358 Histogram* histogram = static_cast<Histogram*>(
362 histogram->AddCount(20, 15);
363 histogram->AddCount(30, 14);
365 std::unique_ptr<HistogramSamples> samples = histogram->SnapshotSamples();
370 histogram->AddCount(20, 25);
371 histogram->AddCount(30, 24);
373 std::unique_ptr<HistogramSamples> samples2 = histogram->SnapshotSamples();
381 Histogram* histogram = static_cast<Histogram*>(
385 histogram->AddCount(200000000, 15);
386 histogram->AddCount(300000000, 14);
388 std::unique_ptr<HistogramSamples> samples = histogram->SnapshotSamples();
393 histogram->AddCount(200000000, 25);
394 histogram->AddCount(300000000, 24);
396 std::unique_ptr<HistogramSamples> samples2 = histogram->SnapshotSamples();
403 // Make sure histogram handles out-of-bounds data gracefully.
406 Histogram* histogram = static_cast<Histogram*>(
411 histogram->Add(5);
412 histogram->Add(-50);
414 histogram->Add(100);
415 histogram->Add(10000);
418 std::unique_ptr<SampleVector> samples = histogram->SnapshotSampleVector();
421 size_t array_size = histogram->bucket_count();
453 Histogram* histogram = static_cast<Histogram*>(
457 histogram->Add(0);
461 histogram->Add(power_of_2);
466 std::unique_ptr<SampleVector> samples = histogram->SnapshotSampleVector();
479 Histogram* histogram = static_cast<Histogram*>(
483 histogram->Add(20);
484 histogram->Add(40);
486 std::unique_ptr<SampleVector> snapshot = histogram->SnapshotSampleVector();
488 histogram->FindCorruption(*snapshot));
494 histogram->FindCorruption(*snapshot));
497 histogram->FindCorruption(*snapshot));
502 histogram->FindCorruption(*snapshot));
506 Histogram* histogram = static_cast<Histogram*>(
509 std::unique_ptr<HistogramSamples> snapshot = histogram->SnapshotSamples();
511 histogram->FindCorruption(*snapshot));
514 const_cast<BucketRanges*>(histogram->bucket_ranges());
520 histogram->FindCorruption(*snapshot));
524 EXPECT_EQ(0U, histogram->FindCorruption(*snapshot));
529 histogram->FindCorruption(*snapshot));
533 histogram->FindCorruption(*snapshot));
535 // Repair histogram so that destructor won't DCHECK().
541 Histogram* histogram = static_cast<Histogram*>(
545 histogram->SerializeInfo(&pickle);
576 EXPECT_EQ(histogram->bucket_ranges()->checksum(), checksum);
617 HistogramBase* histogram = Histogram::FactoryGet(
619 EXPECT_TRUE(histogram->HasConstructionArguments(1, 100, 8));
621 // Try to get the same histogram name with different arguments.
633 // Try to get the same histogram name with different arguments.
647 // Create all histogram names in advance for accurate timing below.
663 VLOG(1) << kTestCreateCount << " histogram creations took " << create_ms
673 // underlying storage use the exact histogram name as the key.
683 VLOG(1) << kTestLookupCount << " histogram lookups took " << lookup_ms
689 HistogramBase* histogram = Histogram::FactoryGet(
691 ASSERT_TRUE(histogram);
694 histogram->Add(i & 127);
698 VLOG(1) << kTestAddCount << " histogram adds took " << add_ms
710 HistogramBase* histogram = Histogram::FactoryGet(
714 histogram->HasConstructionArguments(