MongoDB  2.7.0
Classes | Public Member Functions | List of all members
mongo::Histogram Class Reference

A histogram for a 32-bit integer range. More...

#include <histogram.h>

Classes

struct  Options
 Construct a histogram with 'numBuckets' buckets, optionally having the first bucket start at 'initialValue' rather than 0. More...
 

Public Member Functions

 Histogram (const Options &opts)
 
void insert (uint32_t element)
 Find the bucket that 'element' falls into and increment its count.
 
std::string toHTML () const
 Render the histogram as string that can be used inside an HTML doc.
 
uint64_t getCount (uint32_t bucket) const
 Return the count for the 'bucket'-th bucket.
 
uint32_t getBoundary (uint32_t bucket) const
 Return the maximum element that would fall in the 'bucket'-th bucket.
 
uint32_t getBucketsNum () const
 Return the number of buckets in this histogram.
 

Detailed Description

A histogram for a 32-bit integer range.


The documentation for this class was generated from the following files: