referrerpolicy=no-referrer-when-downgrade

Function substrate_prometheus_endpoint::linear_buckets

pub fn linear_buckets(
    start: f64,
    width: f64,
    count: usize,
) -> Result<Vec<f64>, Error>
Expand description

Create count buckets, each width wide, where the lowest bucket has an upper bound of start. 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 or width is zero or negative.