Expand description
Range-vector window evaluation of raw series onto an evaluation grid.
ModulesΒ§
- function π
- Float range-vector functions as window kernels.
- histogram π
- Range functions over windows that hold native histogram samples, following the histogram branches of Prometheusβ range functions. Windows of floats alone never get here.
StructsΒ§
- Bulk
Scratch π - The buffers the bulk ingest needs for a chunk whose samples are not retained as they arrive: the timestamps shifted by the selector offset, and one compacted column per field.
- Counter
Reset π - One counter reset: a sample that dropped below the sample before it.
- Field
Samples π - Float
Window π - The valid samples of one field inside one window, in source order.
- Float
Windows π - The windows of one field at consecutive grid points, as ranges into the fieldβs retained samples.
- Pending
Batch π - Windows accumulated for the next batch call: one list per field.
- Range
Evaluator - Evaluates range windows over raw series, one series at a time, handing out its results as they become final.
- Range
Window - The samples a range selector reads at evaluation time
T: source timestamps in(E - range_ms, E], whereEisT - offset_ms, oranchor_ms - offset_mswith@. A modifier widens that:anchoredalso reads the lookback beforeE - range_ms,smoothedthe lookback on both sides, and a scan feeding the window has to read that much more. - RowEvaluator π
- Computes the result of every fieldβs window at one grid point.
- Series
State π
EnumsΒ§
- Range
Function - A PromQL range-vector function over float and native histogram samples.
- Range
Modifier - The experimental range selector modifiers of Prometheus, which read samples beyond the
window to pin its boundary values. Not to be confused with an
@anchor, which fixes the windowβs end. - Replay π
- How the windows of an
@-anchored selector map to the grid.
ConstantsΒ§
- EVALUATION_
BATCH π - Grid points accumulated before a batch kernel call. Sized to keep the per-field span and column buffers in cache while staying large enough to amortise the call.
FunctionsΒ§
- accumulate π
- Records one point for the next batch call: its evaluation timestamp and, per field, the range of retained samples its window covers.
- boxed_
bytes π - The bytes the histograms a row holds box, beyond the slots they sit in.
- check_
modifier π - Rejects a modifier on a function Prometheus does not allow it with, as Prometheus rejects the
query (
AnchoredSafeFunctions,SmoothedSafeFunctions), and on evaluated input, which reads no raw samples around its windows. - flush_
batch π - Runs the batch kernel over the accumulated points and appends its columns.
- fold_
offset π - The offset samples are shifted by: the selector offset, or for
@the offset that places the anchored window at the first grid point. - predict_
linear_ πinstants - Checks that
predict_linearcan read the instant of every point ofgridonce shifted byfold_offset. - resets_
between π - The resets inside the window over the absolute positions
[start, end). - subquery_
grid - The inner grid of a subquery read by
windowfrom the outer gridouter: the multiples ofstep_msafterstart - F - rangeup to the last window end, whereFis the fold offset ofwindow; with@, the only window end isstart - F.Nonewhen no multiple falls in the windows. - timestamp_
le π
Type AliasesΒ§
- Batch
Kernel π - Computes a batch of one fieldβs windows at once, appending one result per window to
out. - Window
Kernel π - Computes one window result;
Nonemeans the window has no result.