|
libprom
@VERSION@
C based libraries to expose metrics in Promtheus exposition format
|
https://prometheus.io/docs/concepts/metric_types/#histogram More...
#include "stdlib.h"

Go to the source code of this file.
Classes | |
| struct | phb |
Typedefs | |
| typedef struct phb | phb_t |
Functions | |
| phb_t * | phb_new (size_t count, double bucket,...) |
| Construct a new histogram bucket with the given values. | |
| phb_t * | phb_linear (double start, double width, size_t count) |
| Construct a linearly sized prom histogram bucket. | |
| phb_t * | phb_exponential (double start, double factor, size_t count) |
| Construct an exponentially sized prom histogram bucket. | |
| int | phb_destroy (phb_t *self) |
| Destroy the given prom histogram bucket. | |
| size_t | phb_count (phb_t *self) |
| Get the number of valus in the given bucket. | |
Variables | |
| phb_t * | prom_histogram_default_buckets |
| default histogram buckets: .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10 | |
https://prometheus.io/docs/concepts/metric_types/#histogram
prom_histogram_bucket with PHB . Get the number of valus in the given bucket.
| self | The bucket to query. |
| int phb_destroy | ( | phb_t * | self | ) |
Destroy the given prom histogram bucket.
| self | The bucket to destroy. |
0 . NULL . | phb_t* phb_exponential | ( | double | start, |
| double | factor, | ||
| size_t | count | ||
| ) |
Construct an exponentially sized prom histogram bucket.
| start | The first inclusive upper bound. The value MUST be > 0. |
| factor | The factor to apply to the previous upper bound to produce the next upper bound. The value MUST be greater than 1. |
| count | The total number of buckets. The final +Inf bucket is not counted and not included. The value MUST be greater than or equal to 1. |
NULL if an error occured. | phb_t* phb_linear | ( | double | start, |
| double | width, | ||
| size_t | count | ||
| ) |
Construct a linearly sized prom histogram bucket.
| start | The first inclusive upper bound. |
| width | The distance between each upper bound. |
| count | The total number of buckets. The final +Inf bucket is not counted and not included. |
NULL if an error occured.
1.7.6.1