Skip to main content

window_workspace_bytes

Function window_workspace_bytes 

Source
fn window_workspace_bytes(
    window: &RangeEvaluator,
    last_ts: Option<i64>,
    last: bool,
    fields: &SeriesFields,
    metric: &SeriesLabels,
) -> Result<usize>
Expand description

An upper bound of what window’s next push allocates for the rows it hands out, for input whose last sample is at last_ts, closing its series when last, with fields, of the series metric names.

The rows are bounded by RangeEvaluator::output_rows_bound and written as built_workspace_bytes counts them; the points they sit on are the output grid’s, so each may be a run of its own. A function that can answer with a native histogram also writes an index per field and row and a table row grown by doubling, bounded by the widest histogram the evaluator retains or fields carries. A combination of disjoint layouts can exceed that row; it is not bounded here.