A basic histogram class.
Synopsis
Declared in <folly/stats/Histogram.h>
template<typename T>
class Histogram;
Description
Groups data points into equally‐sized buckets, and stores the overall sum of the data points in each bucket, as well as the number of data points in the bucket.
The caller must specify the minimum and maximum data points to expect ahead of time, as well as the bucket width.
Types
Name |
Description |
Function object returning the average of the values in a bucket. |
|
Function object returning the value count stored in a bucket. |
Type Aliases
Member Functions
Name |
Description |
|
Constructs a histogram over the given range with the given bucket size. |
Add multiple same data points to the histogram |
|
Add a data point to the histogram |
|
Remove all data points from the histogram |
|
Computes the total number of values stored across all buckets. |
|
Copy bucket values from another histogram |
|
Get a human‐readable string describing the histogram contents |
|
Returns the specified bucket (for reading only!) |
|
Returns the maximum threshold for the bucket at the given index. |
|
Returns the minimum threshold for the bucket at the given index. |
|
Returns the bucket size of each bucket in the histogram. |
|
Returns the max value at which bucketing ends. |
|
Returns the min value at which bucketing begins. |
|
Returns the number of buckets |
|
Get the bucket that the specified percentile falls into |
|
Estimate the value at the specified percentile. |
|
Merge two histogram data together |
|
Remove multiple same data points from the histogram |
|
Remove a data point to the histogram |
|
Subtract another histogram data from the histogram |
|
Write the histogram contents in tab‐separated values (TSV) format. Format is "min max count sum". |
Created with MrDocs