19 #include "glog/logging.h" 27 class NullHistogram :
public Histogram {
29 void Observe(
double)
override {}
35 static NullHistogram null_histogram;
36 return &null_histogram;
40 int num_finite_buckets) {
43 for (
int i = 0; i < num_finite_buckets; ++i) {
45 result.push_back(boundary);
54 CHECK_GT(scale_factor, 0);
56 double boundary = scale_factor;
57 while (boundary < max_value) {
58 result.push_back(boundary);
static Histogram * Null()
static BucketBoundaries FixedWidth(double width, int num_finite_buckets)
std::vector< double > BucketBoundaries
static BucketBoundaries ScaledPowersOf(double base, double scale_factor, double max_value)