MongoDB  2.7.0
Public Attributes | List of all members
mongo::Histogram::Options Struct Reference

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
 

Detailed Description

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]


The documentation for this struct was generated from the following file: