Function substrate_prometheus_endpoint::exponential_buckets[][src]

pub fn exponential_buckets(
    start: f64,
    factor: f64,
    count: usize
) -> Result<Vec<f64, Global>, Error>

Create count buckets, where the lowest bucket has an upper bound of start and each following bucket's upper bound is factor times the previous bucket's upper bound. The final +Inf bucket is not counted and not included in the returned slice. The returned slice is meant to be used for the Buckets field of HistogramOpts.

The function returns an error if count is zero, if start is zero or negative, or if factor is less than or equal 1.