10 #include "int_sizes.h"
double histogram_bucket_size(struct histogram *h)
Returns the bucket size.
void histogram_set_bucket(struct histogram *h, double value, int count)
Manually set the count for a bucket.
void histogram_attach_data(struct histogram *h, double value, void *data)
Attach custom data to bucket.
struct histogram * histogram_create(double bucket_size)
Create a new histogram.
int histogram_size(struct histogram *h)
Count the number of active buckets.
double histogram_max_value(struct histogram *h)
Return the maximum value inserted in the histogram.
void histogram_delete(struct histogram *h)
Delete a histogram.
int histogram_count(struct histogram *h, double value)
Look up the count for the bucket of the given value.
void histogram_clear(struct histogram *h)
Remove all entries from a histogram.
void * histogram_get_data(struct histogram *h, double value)
Retrieved custom data attached to the bucket.
double histogram_mode(struct histogram *h)
Return the mode of the histogram.
double histogram_round_up(struct histogram *h, double test_value)
Return the largest value of the bucket that test_value would faill in.
double * histogram_buckets(struct histogram *h)
Returns an ordered array with the start values of the active buckets.
int histogram_total_count(struct histogram *h)
Return the total number of samples in the histogram.
double histogram_min_value(struct histogram *h)
Return the minimum value inserted in the histogram.
int histogram_insert(struct histogram *h, double value)
Add value to histogram.