Skip to main content

Module extrapolate_rate

Module extrapolate_rate 

Source
Expand description

Implementations of rate, increase and delta functions in PromQL.

Structsยง

CounterResetIndex ๐Ÿ”’
Positions of the counter resets in a value array, so that a window can accumulate the resets it contains instead of scanning all of its samples.
ExtrapolatedRate
Part of the extrapolatedRate in Promql, from https://github.com/prometheus/prometheus/blob/v0.40.1/promql/functions.go#L66

Functionsยง

add_counter_resets ๐Ÿ”’
Adds the value preceding every counter reset in values to result, in sample order.
add_counter_resets_between_samples ๐Ÿ”’
Same additions add_counter_resets performs, over the samples in [first, last] instead of over every slot.
extract_eval_timestamps ๐Ÿ”’
valid_window_bounds ๐Ÿ”’
Locates the samples inside [offset, offset + length), returning the first and last non-null index together with the number of non-null slots. Returns None when the window holds no sample.

Type Aliasesยง

Delta
Increase
Rate