Skip to main content

fold

Function fold 

Source
fn fold(is_max: bool, current: &mut f64, value: f64)
Expand description

Folds value into current like Prometheus’ aggregation: a NaN is replaced by any sample, and a NaN sample never replaces a number.