Skip to main content

extrapolated_rate_batch

Function extrapolated_rate_batch 

Source
pub(crate) fn extrapolated_rate_batch<const IS_COUNTER: bool, const IS_RATE: bool>(
    batch: &FloatWindows<'_>,
    out: &mut Vec<Option<f64>>,
)
Expand description

The batch form of extrapolated_rate, over consecutive windows of one field at once.

Computes exactly what calling the per-window form once per point computes – same arithmetic, same order – but reaches each window’s endpoints straight out of the field’s arrays. A rate needs only the first and last sample, the sample count and the resets, so no per-window slice is built and no window struct crosses a boxed call per grid point.