mongo::Histogram::Options Struct Reference

#include <histogram.h>

List of all members.

Public Member Functions

 Options ()

Public Attributes

boost::uint32_t bucketSize
bool exponential
boost::uint32_t initialValue
boost::uint32_t numBuckets

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]

Definition at line 61 of file histogram.h.


Constructor & Destructor Documentation

mongo::Histogram::Options::Options (  )  [inline]

Definition at line 69 of file histogram.h.


Member Data Documentation

Definition at line 63 of file histogram.h.

Definition at line 67 of file histogram.h.

Definition at line 64 of file histogram.h.

Definition at line 62 of file histogram.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:55 2013