Expand description
Float range-vector functions as window kernels. Each kernel follows the Prometheus function of the same name, including its floating point operation order.
StructsΒ§
- Extrapolation
Span π - The span one windowβs extrapolation factor is measured over. A float window starts both
intervals at its first sample; a native histogram counter with a
start_timestampinside the window starts the sampled interval at that synthetic zero instead.
EnumsΒ§
- Range
Function - A PromQL range-vector function over float and native histogram samples.
FunctionsΒ§
- anchored_
values π - Prometheus
pickFirstSampleIndicesfor ananchoredwindow of floats: the values from the last sample at or before the window start on, orNonewhen no sample lies after the start. - avg π
- Prometheus
funcAvgOverTime: the Kahan sum divided by the count, switching to an incremental mean once the sum would overflow. - double_
exponential_ πsmoothing - Prometheus
funcDoubleExponentialSmoothing;RangeEvaluatorchecks the factors. - extended_
rate π - Prometheus
extendedRate:rate,increaseordeltaover ananchoredorsmoothedwindow. The value at the window start is the last sample at or before it, or forsmoothedthe interpolation between it and the next one; the end is picked or interpolated the same way. Nothing is extrapolated. - extrapolated_
rate π - Prometheus
extrapolatedRateover floats. - extrapolated_
rate_ πbatch - The batch form of
extrapolated_rateover consecutive windows of one field; bit-identical to calling the per-window form once per point. - extrapolated_
rate_ πof - The arithmetic of
extrapolated_rate, over a windowβs endpoints and the previous values of its resets. Shared by the per-window and batch forms so their results stay equal. - extrapolation_
factor π - The factor
extrapolatedRatescales the sampled increase by, for floats and native histograms alike.zero_pointis the first value over the increase, given only when a counter is extrapolated to zero;0puts the zero point atspan.sampled_from, as a synthetic zero does. A zero sampled interval answers1.0(1 / rangefor a rate). - interpolate π
- Prometheus
interpolatebetween the samples atindexandindex + 1, att: a counter that reset between them restarts from zero. - last_
two π - linear_
regression π - Prometheus
linearRegression:(slope, intercept)withxin seconds fromintercept_time. Needs at least two samples. - median_
absolute_ πdeviation - Prometheus
funcMadOverTime: the median of the absolute deviations from the median; NaN when any sample is NaN. - quantile π
- Prometheus
quantile, which sorts NaN before every number. - search π
- Go
sort.Search(n, predicate): the first index in[0, n)the predicate holds at, orn. - seconds π
- sum π
- Prometheus
funcSumOverTime. - timestamp_
of_ πextremum - Prometheus
compareOverTimereturning the timestamp: the last sample holding the maximum (or minimum), where a NaN so far is replaced by any later sample. - variance π
- Prometheus
varianceOverTime, the population variance.