|
MongoDB
2.4.4-pre-
|
Construct a histogram with 'numBuckets' buckets, optionally having the first bucket start at 'initialValue' rather than 0. More...
#include <histogram.h>
Public Attributes | |
| uint32_t | numBuckets |
| uint32_t | bucketSize |
| uint32_t | initialValue |
| bool | exponential |
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]
1.8.3.1