Module Ui_metrics_quantile_calc

val list_quantiles : quantiles:float list -> Core.Time_ns.Span.t list -> Core.Time_ns.Span.t list Core.Or_error.t

Compute a quantiles of a list.

quantiles should each be between 0 and 1.

The returned list of quantile values is in ascending order.

Returns an error if data is empty.

val lre_quantiles : quantiles:float list -> counts:int array -> int list Core.Or_error.t

Given a LRE-encoded list of "count" buckets, return the indexes of buckets that contain each quantile, in ascending order.

quantiles should each be between 0 and 1.

Returns an error if data is empty.