pub struct Report {
pub harness_version: String,
pub fast: bool,
pub cases: Vec<String>,
pub skipped: Vec<String>,
pub comparisons: Vec<Comparison>,
pub gaps: Vec<Gap>,
pub sources: Vec<Source>,
}Expand description
A whole run: every comparison, and what it adds up to.
Fields§
§harness_version: StringThe harness’s version.
fast: boolWhether the run was --fast.
cases: Vec<String>The cases it covered, in report order.
skipped: Vec<String>The locked cases it left out, which only a fast run has.
comparisons: Vec<Comparison>Every metric compared.
gaps: Vec<Gap>The cases that ran into a limit of hpr’s they declare, in case order.
sources: Vec<Source>Where each case’s reference came from, in case order.
Implementations§
Source§impl Report
impl Report
Sourcepub fn failures(&self) -> Vec<&Comparison>
pub fn failures(&self) -> Vec<&Comparison>
The comparisons that failed.
Sourcepub fn not_scored(&self) -> Vec<&Comparison>
pub fn not_scored(&self) -> Vec<&Comparison>
The comparisons that were measured but held to no tolerance.
Sourcepub fn worst_scored(&self) -> Option<(&Comparison, f64)>
pub fn worst_scored(&self) -> Option<(&Comparison, f64)>
The largest relative difference among the scored comparisons, as a fraction.
Sourcepub fn reproduces(
&self,
committed_markdown: &str,
committed_json: &str,
) -> Result<(), NotReproduced>
pub fn reproduces( &self, committed_markdown: &str, committed_json: &str, ) -> Result<(), NotReproduced>
Whether this run reproduces a committed report, given the text of its latest.md and
latest.json.
hpr is bit-identical on one platform, not across three (ADR-015, the validation
harness’s decisions), so the numbers are compared at full precision from the JSON, where
hpr’s value and the reference’s may each differ from the committed one by 2e-6 or by 1e-7
of itself, whichever is larger. Everything else is compared exactly: the harness version,
the cases, what was left out, the sources, each comparison’s case, metric, source,
tolerance, verdict and note, and each gap but for the Mach number the integrator narrowed
onto 1. The two committed files come from one run on one platform, so latest.md must be
latest.json‘s rendering letter for letter, and each committed difference must be its
own two values’ difference. A tighter check would assert a cross-platform bit-identity hpr
does not claim; comparing the rendered Markdown instead would fail on a platform whose last
digit rounds a printed percentage the other way.
§Errors
NotReproduced, naming the first difference found, or why the committed JSON does not
parse.
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
The report as Markdown: a summary, one table row per gated or not-scored metric, then predicted mode’s rows in their own table.
It carries no date, so a run that changes nothing changes no bytes and the committed report only moves when a number does.