#include <histogram.h>
Public Member Functions | |
Options () | |
Public Attributes | |
boost::uint32_t | bucketSize |
bool | exponential |
boost::uint32_t | initialValue |
boost::uint32_t | numBuckets |
Construct a histogram with 'numBuckets' buckets, optionally having the first bucket start at 'initialValue' rather than 0. By default, the histogram buckets will be 'bucketSize' wide.
Usage example: Histogram::Options opts; opts.numBuckets = 3; opts.bucketSize = 10; Histogram h( opts );
Generates the bucket ranges [0..10],[11..20],[21..max_int]
Alternatively, the flag 'exponential' could be turned on, in which case a bucket's maximum value will be initialValue + bucketSize * 2 ^ [0..numBuckets-1]
Usage example: Histogram::Options opts; opts.numBuckets = 4; opts.bucketSize = 125; opts.exponential = true; Histogram h( opts );
Generates the bucket ranges [0..125],[126..250],[251..500],[501..max_int]
Definition at line 61 of file histogram.h.
mongo::Histogram::Options::Options | ( | ) | [inline] |
Definition at line 69 of file histogram.h.
boost::uint32_t mongo::Histogram::Options::bucketSize |
Definition at line 63 of file histogram.h.
Definition at line 67 of file histogram.h.
boost::uint32_t mongo::Histogram::Options::initialValue |
Definition at line 64 of file histogram.h.
boost::uint32_t mongo::Histogram::Options::numBuckets |
Definition at line 62 of file histogram.h.