MCPcopy Create free account
hub / github.com/ElementsProject/elements / Clear

Method Clear

src/leveldb/util/histogram.cc:171–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169};
170
171void Histogram::Clear() {
172 min_ = kBucketLimit[kNumBuckets - 1];
173 max_ = 0;
174 num_ = 0;
175 sum_ = 0;
176 sum_squares_ = 0;
177 for (int i = 0; i < kNumBuckets; i++) {
178 buckets_[i] = 0;
179 }
180}
181
182void Histogram::Add(double value) {
183 // Linear search is fast enough for our usage in db_bench

Callers 6

TESTFunction · 0.45
StartMethod · 0.45
StartMethod · 0.45
DoWriteMethod · 0.45
DoDeleteMethod · 0.45
StartMethod · 0.45

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.36