Lines Matching full:ranges

128     BucketRanges* ranges = new BucketRanges(bucket_count_ + 1);  in CreateRanges()  local
129 Histogram::InitializeBucketRanges(minimum_, maximum_, ranges); in CreateRanges()
130 return ranges; in CreateRanges()
135 virtual std::unique_ptr<HistogramBase> HeapAlloc(const BucketRanges* ranges) { in HeapAlloc() argument
137 new Histogram(GetPermanentName(name_), minimum_, maximum_, ranges)); in HeapAlloc()
311 const BucketRanges* ranges, in PersistentCreate() argument
316 return WrapUnique(new Histogram(name, minimum, maximum, ranges, counts, in PersistentCreate()
324 // ranges(i) == ranges(i + 1)
332 BucketRanges* ranges) { in InitializeBucketRanges() argument
338 ranges->set_range(bucket_index, current); in InitializeBucketRanges()
339 size_t bucket_count = ranges->bucket_count(); in InitializeBucketRanges()
353 ranges->set_range(bucket_index, current); in InitializeBucketRanges()
355 ranges->set_range(ranges->bucket_count(), HistogramBase::kSampleType_MAX); in InitializeBucketRanges()
356 ranges->ResetChecksum(); in InitializeBucketRanges()
366 int new_range = ranges(index); in FindCorruption()
397 const BucketRanges* ranges = bucket_ranges(); in declared_min() local
398 if (ranges->bucket_count() < 2) in declared_min()
400 return ranges->range(1); in declared_min()
404 const BucketRanges* ranges = bucket_ranges(); in declared_max() local
405 if (ranges->bucket_count() < 2) in declared_max()
407 return ranges->range(ranges->bucket_count() - 1); in declared_max()
410 Sample Histogram::ranges(uint32_t i) const { in ranges() function in base::Histogram
493 DCHECK_EQ(0, ranges(0)); in AddCount()
494 DCHECK_EQ(kSampleType_MAX, ranges(bucket_count())); in AddCount()
588 const BucketRanges* ranges) in Histogram() argument
590 DCHECK(ranges) << name << ": " << minimum << "-" << maximum; in Histogram()
591 unlogged_samples_.reset(new SampleVector(HashMetricName(name), ranges)); in Histogram()
592 logged_samples_.reset(new SampleVector(unlogged_samples_->id(), ranges)); in Histogram()
598 const BucketRanges* ranges, in Histogram() argument
604 DCHECK(ranges) << name << ": " << minimum << "-" << maximum; in Histogram()
606 new PersistentSampleVector(HashMetricName(name), ranges, meta, counts)); in Histogram()
608 unlogged_samples_->id(), ranges, logged_meta, logged_counts)); in Histogram()
623 DCHECK_GT(ranges(i + 1), ranges(i)); in GetBucketSize()
625 double denominator = ranges(i + 1) - ranges(i); in GetBucketSize()
632 return GetSimpleAsciiBucketRange(ranges(i)); in GetAsciiBucketRange()
801 bucket_value->SetInteger("low", ranges(i)); in GetCountAndBucketData()
803 bucket_value->SetInteger("high", ranges(i + 1)); in GetCountAndBucketData()
832 BucketRanges* ranges = new BucketRanges(bucket_count_ + 1); in CreateRanges() local
833 LinearHistogram::InitializeBucketRanges(minimum_, maximum_, ranges); in CreateRanges()
834 return ranges; in CreateRanges()
838 const BucketRanges* ranges) override { in HeapAlloc() argument
840 maximum_, ranges)); in HeapAlloc()
908 const BucketRanges* ranges, in PersistentCreate() argument
913 return WrapUnique(new LinearHistogram(name, minimum, maximum, ranges, counts, in PersistentCreate()
939 const BucketRanges* ranges) in LinearHistogram() argument
940 : Histogram(name, minimum, maximum, ranges) {} in LinearHistogram()
946 const BucketRanges* ranges, in LinearHistogram() argument
954 ranges, in LinearHistogram()
961 DCHECK_GT(ranges(i + 1), ranges(i)); in GetBucketSize()
964 double denominator = ranges(i + 1) - ranges(i); in GetBucketSize()
969 int range = ranges(i); in GetAsciiBucketRange()
977 return bucket_description_.find(ranges(index)) == bucket_description_.end(); in PrintEmptyBucket()
983 BucketRanges* ranges) { in InitializeBucketRanges() argument
986 size_t bucket_count = ranges->bucket_count(); in InitializeBucketRanges()
990 ranges->set_range(i, static_cast<Sample>(linear_range + 0.5)); in InitializeBucketRanges()
992 ranges->set_range(ranges->bucket_count(), HistogramBase::kSampleType_MAX); in InitializeBucketRanges()
993 ranges->ResetChecksum(); in InitializeBucketRanges()
1100 BucketRanges* ranges = new BucketRanges(3 + 1); in CreateRanges() local
1101 LinearHistogram::InitializeBucketRanges(1, 2, ranges); in CreateRanges()
1102 return ranges; in CreateRanges()
1106 const BucketRanges* ranges) override { in HeapAlloc() argument
1107 return WrapUnique(new BooleanHistogram(GetPermanentName(name_), ranges)); in HeapAlloc()
1125 const BucketRanges* ranges, in PersistentCreate() argument
1130 return WrapUnique(new BooleanHistogram(name, ranges, counts, logged_counts, in PersistentCreate()
1138 BooleanHistogram::BooleanHistogram(const char* name, const BucketRanges* ranges) in BooleanHistogram() argument
1139 : LinearHistogram(name, 1, 2, ranges) {} in BooleanHistogram()
1143 const BucketRanges* ranges, in BooleanHistogram() argument
1151 ranges, in BooleanHistogram()
1198 // Remove the duplicates in the custom ranges array. in CreateRanges()
1199 std::vector<int> ranges = *custom_ranges_; in CreateRanges() local
1200 ranges.push_back(0); // Ensure we have a zero value. in CreateRanges()
1201 ranges.push_back(HistogramBase::kSampleType_MAX); in CreateRanges()
1202 std::sort(ranges.begin(), ranges.end()); in CreateRanges()
1203 ranges.erase(std::unique(ranges.begin(), ranges.end()), ranges.end()); in CreateRanges()
1205 BucketRanges* bucket_ranges = new BucketRanges(ranges.size()); in CreateRanges()
1206 for (uint32_t i = 0; i < ranges.size(); i++) { in CreateRanges()
1207 bucket_ranges->set_range(i, ranges[i]); in CreateRanges()
1214 const BucketRanges* ranges) override { in HeapAlloc() argument
1215 return WrapUnique(new CustomHistogram(GetPermanentName(name_), ranges)); in HeapAlloc()
1242 const BucketRanges* ranges, in PersistentCreate() argument
1247 return WrapUnique(new CustomHistogram(name, ranges, counts, logged_counts, in PersistentCreate()
1269 CustomHistogram::CustomHistogram(const char* name, const BucketRanges* ranges) in CustomHistogram() argument
1271 ranges->range(1), in CustomHistogram()
1272 ranges->range(ranges->bucket_count() - 1), in CustomHistogram()
1273 ranges) {} in CustomHistogram()
1277 const BucketRanges* ranges, in CustomHistogram() argument
1283 ranges->range(1), in CustomHistogram()
1284 ranges->range(ranges->bucket_count() - 1), in CustomHistogram()
1285 ranges, in CustomHistogram()
1294 // Serialize ranges. First and last ranges are alwasy 0 and INT_MAX, so don't in SerializeInfoImpl()
1320 // First and last ranges are not serialized. in DeserializeInfoImpl()