Expand description
Local float aggregation over evaluated series, following Prometheusโ aggregation. State
is keyed by absolute grid index, never by local row number; sparse state and trimmed output
do not expand the full grid.
Modulesยง
- state ๐
- Partial aggregation: the state one execution partition folds its series into, and the merge of such states into the final result.
Structsยง
- Accumulator
State - The state of one field of one group at one grid point.
- Field
Fold ๐ - Which field of which layout a fold is writing, and how it folds it.
- Float
Aggregator aggregate_floatfed one series at a time, for a caller that does not hold all its input at once. Series are folded in the order they arrive, with the same semantics.- Float
Merger - Merges the partial states of one aggregation into its result. Groups are identified by their full label set, already grouped by the partitions, and keep the order they first arrive in.
- Float
State ๐ - The float part of Prometheusโ
groupedAggregation, as a view of one stateโs words. - Group ๐
- Histogram
Accumulator ๐ - One positionโs histogram fold: the live payload, the compensation paired with it, the running mean an average switched to, and the evidence the fold recorded beside them.
- Histogram
Evidence ๐ - The evidence bits a histogram fold records beside its payload.
- Partial
Aggregate - The state of one execution partition, with its groups in the order they first appeared.
Enumsยง
- Aggregate
Op - Float aggregations without a parameter.
- Grouping
- Grouping by series labels. No modifier is
By(&[]), as in Prometheus. - Histogram
Samples ๐ - What an aggregate does with a native histogram sample.
- State
Field - A component of
AccumulatorState. - Value ๐
- The value of a
count_valuessample, as it is grouped.
Constantsยง
- BLOCK_
POINTS ๐ - Grid points per state block. A block is allocated only once a sample falls in it, so sparse input never expands to the full grid and dense input costs one allocation per block.
Functionsยง
- accumulator_
bytes ๐ - Bytes one histogram position holds: every histogram it keeps, with buckets, bounds and spans.
- aggregate_
float - Aggregates each field at each absolute evaluation instant.
- aggregate_
quantile quantile(q, v), withqread at each grid point from an unlabelled single-field scalar on the same grid, as Prometheus evaluates the parameter at every step. A point whereqhas no value has no result;qoutside[0, 1]or NaN gives what Prometheusโquantilegives.- block_
bytes ๐ - Bytes one allocated block keeps: a state per point per field,
AggregateOp::state_wordswords off64each. The fold, the merge and the recount all size a block through this, so what is admitted and what is allocated cannot drift apart. - btree_
backing_ ๐bytes - An upper bound on the bytes a B-tree of
entriesholds. - btree_
node_ ๐bytes - An upper bound on the bytes one B-tree node holds.
- count_
series ๐ - count_
values count_values(label, v): at each grid point, the number of samples in each group of series that share a value, with the value written tolabelin PrometheusโFormatFloat(v, 'f', -1)form, or for a native histogram as itsFloatHistogram.String. Withby,labelis part of the grouping; withwithout, it is dropped if listed.- decoded_
histogram ๐ - The histogram a payload component carries.
- evidence_
summary ๐ - The evidence a fold or a merge has to report, once, wherever it finishes.
- finish_
groups ๐ - The result of every group, without a budget: the entry the partial-state merger takes, which does not hold a query pool to admit against.
- finish_
groups_ ๐budgeted - Turns the state of
groupsinto result series, in group order, admitting as it builds. - finish_
histogram_ ๐group - Builds one groupโs histogram result, or
Nonewhen it has nothing left to answer. - finish_
working_ ๐bytes - finished_
histogram ๐ - One positionโs answer, compacted, or
Nonewhen the point was poisoned. - group_
rows_ ๐runs - grouping_
bytes ๐ - grouping_
workspace_ ๐bytes - hash_
map_ ๐backing_ bytes - Conservative backing estimate for Rust 1.98.1โs insert-only
HashMap(hashbrown 0.17.1). Bucket count follows its 7/8 load factor; entries, one control byte per bucket and the 16-byte control-group tail are counted. This models requested table storage, not allocator slack. An upper bound on the bytes the group index holds forcapacityentries. - histogram_
backing_ ๐bytes - An upper bound on the bytes a histogram map of
entriesholds, likebtree_backing_bytes. - histogram_
batch ๐ - One histogram as the frame payloadโs own one-row batch.
- histogram_
finish_ ๐bytes - Bytes
finish_histogram_groupworks in while it builds one groupโs result. - histogram_
node_ ๐bytes - An upper bound on the bytes one node of a groupโs histogram map holds.
- histogram_
samples ๐ - What
opdoes with a native histogram sample. - kahan_
inc ๐ - Prometheus
kahansum.Inc, with the Neumaier swap. - label_
key ๐ - labels_
capacity_ ๐bytes - merge_
count_ values - Merges
count_valuesresults of several partitions. Each partial already carries its full output label set, value label included, so series with one label set add their counts point by point and field by field. - metric_
bytes ๐ - next_
hash_ ๐capacity - An upper bound on the capacity a map holding
capacityentries grows to. - pending_
bytes ๐ - Transient bytes the fold needs for one fieldโs row while it folds a series. The samples are written straight into their blocks, so a blockโs staging buffer is no longer part of this.
- state_
finish ๐ - The value the state in
wordsfinishes to, orNoneif it has seen no sample. - state_
seen ๐ - Whether the state in
wordshas seen a sample: its presence word is set. - update_
avg ๐ avgโs update: sums directly until the running sum would overflow, then switches to an incremental mean, whose flag is the fourth word.- validate_
aggregate_ ๐series - Checks a series for the aggregate
opfolds, and returns its evaluated axis. - validate_
count_ ๐values - Validates the schema-only requirements shared by the kernel and native runtime construction.
- validate_
grouping ๐ - validate_
input ๐ - Schema validation is repeated because Series exposes its fields publicly.
- validate_
vector_ ๐grouping - Validates the grouping a whole-vector operation addresses its series by.