Skip to main content

SummaryConfig

Struct SummaryConfig 

Source
pub struct SummaryConfig {
    pub columns: Vec<String>,
    pub row_filters: Vec<String>,
    pub aggregates: Vec<AggregateExpr>,
    pub show_details: bool,
    pub raw: String,
    pub metricsql_columns: Vec<(String, String)>,
    pub group_by: Vec<String>,
    pub state_query: Option<String>,
    pub header_notes: Vec<(String, String)>,
}
Expand description

Parsed summary report configuration.

Controls which columns, rows, and aggregates appear in the post-run summary table. Parsed from a semicolon-delimited DSL:

"recall; mean(recall) over profile~label; details=hide"

Directives:

  • Bare words (no = or (): gauge column filter patterns, comma-separated. "all" shows every discovered gauge.
  • filter=<regex>: row filter on activity labels.
  • <func>(<col>) over <key>~<pat>: aggregate expression.
  • details=hide: suppress individual data rows.

Fields§

§columns: Vec<String>

Gauge column filter patterns (e.g., ["recall", "precision"]). Empty means show all discovered gauges.

§row_filters: Vec<String>

Row filter regex patterns on activity labels.

§aggregates: Vec<AggregateExpr>

Aggregate expressions to compute after the data rows.

§show_details: bool

Whether to show individual data rows (default true).

§raw: String

Raw source string for diagnostics and future Polydat template detection.

§metricsql_columns: Vec<(String, String)>

SRD-46 v2: native MetricsQL columns. When non-empty, summary_command routes through the metricsql renderer instead of the legacy SQL builder. Each entry is (column_name, metricsql_expression). Anonymous single-column form (query: <expr>) lands as ("value", expr).

§group_by: Vec<String>

Label key the metricsql results are grouped on (becomes the leftmost column of the rendered table). When empty AND metricsql_columns is non-empty, the renderer falls back to a single un-grouped row showing the average value across all returned series.

Multi-key form: group_by: k, r, optimize_for produces one table row per distinct tuple — the same series breakdown the matching plot draws.

§state_query: Option<String>

SRD-46 — state: <expr>: a per-row COMPLETION test rendered as a word rather than a number. A row whose expression yields a value is complete; a row with none is active.

The expression to use is whatever the workload records only at completion, so “has this finished” is answered by the presence of that datum rather than inferred from a progress percentage — a progress gauge can sit below 100 on a row that finished, because the last poll before completion is the value that persists.

§header_notes: Vec<(String, String)>

Per-column header annotations (header <col>: <text>) — rendered into the column’s header stack under its name, so a table can carry each column’s DEFINITION (e.g. the SRD-113 designation last(result_success)) where the reader is already looking.

Implementations§

Source§

impl SummaryConfig

Source

pub fn parse(raw: &str) -> Self

Parse a short-form summary DSL string.

Semicolon-separated directives:

  • "recall,precision" — column filters
  • "filter=search_post" — row filter
  • "mean(recall) over profile~label" — aggregate expression
  • "details=hide" — hide individual data rows

Trait Implementations§

Source§

impl Clone for SummaryConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SummaryConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SummaryConfig

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SummaryConfig

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.