Skip to main content

window_quantile

Function window_quantile 

Source
fn window_quantile(
    values: &[f64],
    quantile: f64,
    scratch: &mut Vec<f64>,
) -> Option<f64>
Expand description

Quantile of one range window, or None when the window holds no sample.

Prometheus returns an empty vector for a range without float samples rather than the NaN that quantile_impl yields for an empty slice, so the emptiness check belongs here and not in the shared kernel.