1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
5 #ifndef STORAGE_LEVELDB_UTIL_HISTOGRAM_H_
6 #define STORAGE_LEVELDB_UTIL_HISTOGRAM_H_
18 void Add(double value
);
19 void Merge(const Histogram
& other
);
21 std::string
ToString() const;
30 enum { kNumBuckets
= 154 };
31 static const double kBucketLimit
[kNumBuckets
];
32 double buckets_
[kNumBuckets
];
34 double Median() const;
35 double Percentile(double p
) const;
36 double Average() const;
37 double StandardDeviation() const;
40 } // namespace leveldb
42 #endif // STORAGE_LEVELDB_UTIL_HISTOGRAM_H_