Home | History | Annotate | Download | only in metrics

Lines Matching refs:histogram

16 #include "base/metrics/histogram.h"
29 // Name of histogram for storing results of local operations.
38 kTypeIdHistogram = 0xF1645910 + 2, // SHA1(Histogram) v2
74 // Calculate the number of bytes required to store all of a histogram's
162 // The sample-record could be for any sparse histogram. Add the reference
238 // Space for the histogram name will be added during the actual allocation
268 // Unfortunately, the histogram "pickle" methods cannot be used as part of
303 // Create the metadata necessary for a persistent sparse histogram. This
361 // Create the histogram using resources in persistent memory. This ends up
365 // correct before commiting the new histogram to persistent space.
366 std::unique_ptr<HistogramBase> histogram = CreateHistogram(histogram_data);
367 DCHECK(histogram);
371 // By storing the reference within the allocator to this histogram, the
372 // next import (which will happen before the next histogram creation)
376 return histogram;
396 // If the created persistent histogram was registered then it needs to
408 HistogramBase* histogram) {
409 DCHECK(histogram);
411 HistogramBase* existing = GetOrCreateStatisticsRecorderHistogram(histogram);
423 existing->AddSamples(*histogram->SnapshotDelta());
427 const HistogramBase* histogram) {
428 DCHECK(histogram);
430 HistogramBase* existing = GetOrCreateStatisticsRecorderHistogram(histogram);
439 existing->AddSamples(*histogram->SnapshotFinalDelta());
463 // Get the histogram in which create-results are stored. This is copied
466 // of a new a histogram can end up calling this.)
485 DLOG(WARNING) << "Creating the results-histogram inside persistent"
512 std::unique_ptr<HistogramBase> histogram =
516 DCHECK(histogram);
517 histogram->SetFlags(histogram_data_ptr->flags);
519 return histogram;
579 std::unique_ptr<HistogramBase> histogram;
581 case HISTOGRAM:
582 histogram = Histogram::PersistentCreate(
587 DCHECK(histogram);
590 histogram = LinearHistogram::PersistentCreate(
595 DCHECK(histogram);
598 histogram = BooleanHistogram::PersistentCreate(
602 DCHECK(histogram);
605 histogram = CustomHistogram::PersistentCreate(
609 DCHECK(histogram);
615 if (histogram) {
616 DCHECK_EQ(histogram_data.histogram_type, histogram->GetHistogramType());
617 histogram->SetFlags(histogram_data.flags);
623 return histogram;
628 const HistogramBase* histogram) {
629 // This should never be called on the global histogram allocator as objects
632 DCHECK(histogram);
635 StatisticsRecorder::FindHistogram(histogram->histogram_name());
639 // Adding the passed histogram to the SR would cause a problem if the
643 if (!histogram->SerializeInfo(&pickle))
652 // Record the newly created histogram in the SR.
793 // If a test breaks here then a memory region containing a histogram
799 // histogram is instead allocated from the process heap.
846 // Skip the import if it's the histogram that was last created. Should a
848 // is recognized here then the histogram will be created and be ignored
858 std::unique_ptr<HistogramBase> histogram =
860 if (!histogram)
862 StatisticsRecorder::RegisterOrDeleteDuplicate(histogram.release());