Files
greptimedb/promql/range_eval/index.html
T

20 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Range-vector window evaluation of raw series onto an evaluation grid."><title>promql::range_eval - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-1ed95124.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="promql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.98.1 (48a229cea 2026-09-01)" data-channel="1.98.1" data-search-js="search-9944d736.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-417ebf0a.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module range_eval</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../promql/index.html">promql</a><span class="version">1.4.0-alpha.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module range_<wbr>eval</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate promql</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">promql</a></div><h1>Module <span>range_<wbr>eval</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/promql/range_eval.rs.html#15-1606">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Range-vector window evaluation of raw series onto an evaluation grid.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="function/index.html" title="mod promql::range_eval::function">function</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Float range-vector functions as window kernels. Each kernel follows the Prometheus function
of the same name, including its floating point operation order.</dd><dt><a class="mod" href="histogram/index.html" title="mod promql::range_eval::histogram">histogram</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Range functions over windows that hold native histogram samples, following the histogram
branches of Prometheus’ range functions. Windows of floats alone never get here.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.BulkScratch.html" title="struct promql::range_eval::BulkScratch">Bulk<wbr>Scratch</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>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.</dd><dt><a class="struct" href="struct.CounterReset.html" title="struct promql::range_eval::CounterReset">Counter<wbr>Reset</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>One counter reset: a sample that dropped below the sample before it.</dd><dt><a class="struct" href="struct.FieldSamples.html" title="struct promql::range_eval::FieldSamples">Field<wbr>Samples</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="struct" href="struct.FloatWindow.html" title="struct promql::range_eval::FloatWindow">Float<wbr>Window</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The valid samples of one field inside one window, in source order.</dd><dt><a class="struct" href="struct.FloatWindows.html" title="struct promql::range_eval::FloatWindows">Float<wbr>Windows</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The windows of one field at consecutive grid points, as ranges into the field’s retained
samples.</dd><dt><a class="struct" href="struct.PendingBatch.html" title="struct promql::range_eval::PendingBatch">Pending<wbr>Batch</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Windows accumulated for the next batch call: one list per field.</dd><dt><a class="struct" href="struct.RangeEvaluator.html" title="struct promql::range_eval::RangeEvaluator">Range<wbr>Evaluator</a></dt><dd>Evaluates range windows over series pushed one at a time, chunk by chunk.</dd><dt><a class="struct" href="struct.RangeWindow.html" title="struct promql::range_eval::RangeWindow">Range<wbr>Window</a></dt><dd>The samples a range selector reads at evaluation time <code>T</code>: source timestamps in
<code>(E - range_ms, E]</code>, where <code>E</code> is <code>T - offset_ms</code>, or <code>anchor_ms - offset_ms</code> with <code>@</code>. A
modifier widens that: <code>anchored</code> also reads the lookback before <code>E - range_ms</code>, <code>smoothed</code> the
lookback on both sides, and a scan feeding the window has to read that much more.</dd><dt><a class="struct" href="struct.RowEvaluator.html" title="struct promql::range_eval::RowEvaluator">RowEvaluator</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Computes the result of every field’s window at one grid point.</dd><dt><a class="struct" href="struct.SeriesState.html" title="struct promql::range_eval::SeriesState">Series<wbr>State</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.RangeFunction.html" title="enum promql::range_eval::RangeFunction">Range<wbr>Function</a></dt><dd>A PromQL range-vector function over float and native histogram samples.</dd><dt><a class="enum" href="enum.RangeModifier.html" title="enum promql::range_eval::RangeModifier">Range<wbr>Modifier</a></dt><dd>The experimental range selector modifiers of Prometheus, which read samples beyond the
window to pin its boundary values. Not to be confused with an <code>@</code> anchor, which fixes the
window’s end.</dd><dt><a class="enum" href="enum.Replay.html" title="enum promql::range_eval::Replay">Replay</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>How the windows of an <code>@</code>-anchored selector map to the grid.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.EVALUATION_BATCH.html" title="constant promql::range_eval::EVALUATION_BATCH">EVALUATION_<wbr>BATCH</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>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.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.accumulate.html" title="fn promql::range_eval::accumulate">accumulate</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Records one point for the next batch call: its evaluation timestamp and, per field, the range
of retained samples its window covers.</dd><dt><a class="fn" href="fn.boxed_bytes.html" title="fn promql::range_eval::boxed_bytes">boxed_<wbr>bytes</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The heap bytes of the histograms boxed in <code>row</code>, beyond the slots themselves. The row survives
between pushes holding the last evaluated point.</dd><dt><a class="fn" href="fn.check_modifier.html" title="fn promql::range_eval::check_modifier">check_<wbr>modifier</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Rejects a modifier on a function Prometheus does not allow it with
(<code>AnchoredSafeFunctions</code>, <code>SmoothedSafeFunctions</code>), and on evaluated input. Shared with the
native admission predicate.</dd><dt><a class="fn" href="fn.flush_batch.html" title="fn promql::range_eval::flush_batch">flush_<wbr>batch</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Runs the batch kernel over the accumulated points and appends its columns.</dd><dt><a class="fn" href="fn.fold_offset.html" title="fn promql::range_eval::fold_offset">fold_<wbr>offset</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The offset samples are shifted by: the selector offset, or for <code>@</code> the offset that places
the anchored window at the first grid point. Shared with the native admission predicate.</dd><dt><a class="fn" href="fn.is_delta_temporality.html" title="fn promql::range_eval::is_delta_temporality">is_<wbr>delta_<wbr>temporality</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Whether <code>metric</code> is marked as OTLP delta temporality.</dd><dt><a class="fn" href="fn.resets_between.html" title="fn promql::range_eval::resets_between">resets_<wbr>between</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The resets inside the window over the absolute positions <code>[start, end)</code>.</dd><dt><a class="fn" href="fn.subquery_grid.html" title="fn promql::range_eval::subquery_grid">subquery_<wbr>grid</a></dt><dd>The inner grid of a subquery read by <code>window</code> from the outer grid <code>outer</code>: the multiples of
<code>step_ms</code> after <code>start - F - range</code> up to the last window end, where <code>F</code> is the fold offset
of <code>window</code>; with <code>@</code>, the only window end is <code>start - F</code>. <code>None</code> when no multiple falls in
the windows.</dd><dt><a class="fn" href="fn.timestamp_le.html" title="fn promql::range_eval::timestamp_le">timestamp_<wbr>le</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.BatchKernel.html" title="type promql::range_eval::BatchKernel">Batch<wbr>Kernel</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Computes a batch of one field’s windows at once, appending one result per window to <code>out</code>.</dd><dt><a class="type" href="type.WindowKernel.html" title="type promql::range_eval::WindowKernel">Window<wbr>Kernel</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Computes one window result; <code>None</code> means the window has no result.</dd></dl></section></div></main></body></html>