pub struct ReportDiff {
pub rows: Vec<MetricDelta>,
}Expand description
Result of MultiReport::diff.
Fields§
§rows: Vec<MetricDelta>One row per metric in the current report.
Implementations§
Source§impl ReportDiff
impl ReportDiff
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Render the diff as a Markdown table including per-metric mean delta
and per-query winner/loser/unchanged counts. Per-query movers are
not inlined; inspect MetricDelta::query_changes for that detail.
Sourcepub fn regressions(&self, gate: &RegressionGate) -> Vec<MetricDelta>
pub fn regressions(&self, gate: &RegressionGate) -> Vec<MetricDelta>
Evaluate the diff against a RegressionGate. Returns the subset
of MetricDelta rows whose mean delta is more negative than the
configured threshold for that metric. Metrics not listed in the
gate are ignored.
Sourcepub fn is_clean(&self, gate: &RegressionGate) -> bool
pub fn is_clean(&self, gate: &RegressionGate) -> bool
True when ReportDiff::regressions returns no rows for gate.
Convenience accessor for CI scripts that just want a yes / no.
Sourcepub fn exit_code(&self, gate: &RegressionGate) -> i32
pub fn exit_code(&self, gate: &RegressionGate) -> i32
Process exit code suitable for std::process::exit in a CI eval
binary: 0 when the diff passes gate, 1 when one or more
metrics regress beyond their tolerated drop. Mirrors the
long-standing UNIX convention of 0 = success, non-zero = failure
and is the single bit consumers should branch on.
Trait Implementations§
Source§impl Clone for ReportDiff
impl Clone for ReportDiff
Source§fn clone(&self) -> ReportDiff
fn clone(&self) -> ReportDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more