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. Arithmetic that GreptimeDBβs range UDFs compute the same way is shared with them.
StructsΒ§
- Extrapolation
Span π - The span one windowβs extrapolation factor is measured over.
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_rate, over consecutive windows of one field at once. - extrapolated_
rate_ πof - The arithmetic of
extrapolated_rate, over a windowβs endpoints and the previous values of its resets. - extrapolation_
factor π - The factor
extrapolatedRatescales the sampled increase by.zero_pointis the first value over the increase, given only when Prometheus extrapolates a counter to zero: it is the share of the sampled interval that lies beforespan.sampled_from, so0says the counterβs zero point isspan.sampled_fromitself, which is what a synthetic zero is. - 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.