Home
last modified time | relevance | path

Searched refs:histogram_proto (Results 1 – 2 of 2) sorted by relevance

/system/core/metricsd/uploader/
Dmetrics_log_base_unittest.cc103 const metrics::HistogramEventProto& histogram_proto = in TEST() local
108 ASSERT_EQ(5, histogram_proto.bucket_size()); in TEST()
111 EXPECT_TRUE(histogram_proto.bucket(0).has_min()); in TEST()
112 EXPECT_FALSE(histogram_proto.bucket(0).has_max()); in TEST()
113 EXPECT_EQ(1, histogram_proto.bucket(0).min()); in TEST()
116 EXPECT_TRUE(histogram_proto.bucket(1).has_min()); in TEST()
117 EXPECT_TRUE(histogram_proto.bucket(1).has_max()); in TEST()
118 EXPECT_EQ(5, histogram_proto.bucket(1).min()); in TEST()
119 EXPECT_EQ(7, histogram_proto.bucket(1).max()); in TEST()
122 EXPECT_FALSE(histogram_proto.bucket(2).has_min()); in TEST()
[all …]
Dmetrics_log_base.cc124 HistogramEventProto* histogram_proto = uma_proto_.add_histogram_event(); in RecordHistogramDelta() local
125 histogram_proto->set_name_hash(Hash(histogram_name)); in RecordHistogramDelta()
126 histogram_proto->set_sum(snapshot.sum()); in RecordHistogramDelta()
134 HistogramEventProto::Bucket* bucket = histogram_proto->add_bucket(); in RecordHistogramDelta()
141 for (int i = 0; i < histogram_proto->bucket_size(); ++i) { in RecordHistogramDelta()
142 HistogramEventProto::Bucket* bucket = histogram_proto->mutable_bucket(i); in RecordHistogramDelta()
143 if (i + 1 < histogram_proto->bucket_size() && in RecordHistogramDelta()
144 bucket->max() == histogram_proto->bucket(i + 1).min()) { in RecordHistogramDelta()