Skip to main content

extrapolated_rate_of

Function extrapolated_rate_of 

Source
fn extrapolated_rate_of(
    (first_t, last_t): (i64, i64),
    (first, last): (f64, f64),
    samples_minus_one: usize,
    resets: impl Iterator<Item = f64>,
    eval_ts: i64,
    range_ms: i64,
    (is_counter, is_rate): (bool, bool),
) -> Option<f64>
Expand description

The arithmetic of extrapolated_rate, over a window’s endpoints and the previous values of its resets.

Both callers reach it: the per-window form with a slice of the field, the batch form with the field’s own arrays. Keeping it in one place is what holds their results equal; the two differ only in how they find the endpoints.