promgleam/buckets
Utility functions to generate buckets for Histogram metrics.
Types
Functions
pub fn exponential(
start start: Float,
factor factor: Int,
count count: Int,
) -> Result(List(Float), String)
Creates 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.
Examples
let assert Ok([1.0, 2.0, 4.0, 8.0]) = exponential(start: 1.0, factor: 2, count: 4)