pub struct Comparison {
pub changes: Vec<Change>,
pub added: Vec<Key>,
pub removed: Vec<Key>,
pub accepted: Acceptances,
pub ignored_trailers: Acceptances,
pub gate_source: Option<String>,
pub allowed_empty: bool,
}Fields§
§changes: Vec<Change>Every metric present on both sides, in a stable order.
added: Vec<Key>Series measured on the head commit and not the base — a new benchmark, or the first run on a new runner class. Reported, never gated: there is nothing to compare against.
removed: Vec<Key>Series on the base and not the head. Usually a benchmark that was removed, occasionally a run that failed to record — worth surfacing either way, because a silently vanishing benchmark stops gating.
accepted: AcceptancesBenchmarks the change declared it regresses on purpose. Their
regressions are still reported, and still counted by regressions,
but not by failures — the set the gate actually fails on.
ignored_trailers: AcceptancesTak-Accept trailers found in the range and deliberately not honoured,
because accept_trailers is off. Kept only to say so in the report.
gate_source: Option<String>One Markdown line on where the gate came from, when that is worth
saying: the base had no tak.toml, or the head’s would gate
differently. Rendered below the verdict rather than above it, because
scripts read the report’s first line as its outcome.
allowed_empty: boolSet when nothing was compared and allow_empty passed it rather than
failing it. Carried here, as detect carries its own, so the report
and the exit status cannot disagree.
Implementations§
Source§impl Comparison
impl Comparison
Sourcepub fn regressions(&self, gates: &Gates) -> Vec<&Change>
pub fn regressions(&self, gates: &Gates) -> Vec<&Change>
Changes beyond an enabled gate, accepted or not.
Sourcepub fn failures(&self, gates: &Gates) -> Vec<&Change>
pub fn failures(&self, gates: &Gates) -> Vec<&Change>
What tak compare fails on: regressions no acceptance covers.
Layered on regressions, so each series is
still judged against its own effective gate, and an acceptance can only
waive a change that would otherwise have failed. A report-only series
never reaches this, so it never needs accepting.
Sourcepub fn accepted_regressions(&self, gates: &Gates) -> Vec<&Change>
pub fn accepted_regressions(&self, gates: &Gates) -> Vec<&Change>
The regressions an acceptance waived.
Sourcepub fn with_accepted(self, accepted: Acceptances) -> Self
pub fn with_accepted(self, accepted: Acceptances) -> Self
Attach what the change declared. Separate from compare because the
numbers and the declaration come from different places — notes and
commit messages — and a comparison is meaningful without either.
Sourcepub fn with_ignored_trailers(self, ignored: Acceptances) -> Self
pub fn with_ignored_trailers(self, ignored: Acceptances) -> Self
Record trailers that were present but not honoured. They never affect the gate; they exist so the report can explain why a trailer did nothing.
Sourcepub fn reported(&self, gates: &Gates) -> Vec<&Change>
pub fn reported(&self, gates: &Gates) -> Vec<&Change>
Changes beyond a report-only gate: flagged, never failed on.
Sourcepub fn gated_uniformly(&self, gates: &Gates) -> bool
pub fn gated_uniformly(&self, gates: &Gates) -> bool
Whether every instruction count here is held to the global gate.
When it is, the report and the error read exactly as they did before per-benchmark gates existed. Scripts grep them — tak’s own perf-pr workflow among them — and a project that never wrote a per-benchmark gate should not have its output change under it.