Expand description
Accepted baselines and the regression policy. A baseline is a tracked result document
of one platform (os-arch-buildprofile), promoted explicitly from a local run by
bench baseline update; the policy is data in .ai/repo/benchmarks/rust/policy.yaml
(the shell tool keeps its own evidence beside it, under .ai/repo/benchmarks/). A
check compares each measurement of a run with the baseline’s under the policy and
reports every line; a target the baseline knows and the run does not is reported as
stale, never silently attached to something else, and a baseline of another platform
is not compared at all.
A budget is the other half of the policy: an absolute bound on a metric of every
target under a prefix (budgets: in the same file). A regression threshold asks whether
a target got slower than it was on this host; a budget asks whether it is fast enough at
all, which no baseline can answer, since a target that was always too slow never
regresses. A budget therefore needs no baseline and is held on every host.
Structs§
- Budget
- An absolute bound on one metric of every target whose key starts with a prefix.
- Budget
Line - One measurement held against a budget.
- Check
- The outcome of a check.
- Check
Line - One line of a check.
- Policy
- The regression policy.
- Threshold
- One threshold: a relative increase allowed on a metric.
Constants§
- BASELINE_
DIR - Where the Rust executable’s baselines and policy live, relative to the tracked half.
- POLICY_
FILE - The policy file’s name.
Functions§
- baseline_
path .ai/repo/benchmarks/rust/baseline.<platform>.json.- load_
baseline - Read a baseline, when there is one for the platform.
- policy_
path .ai/repo/benchmarks/rust/policy.yaml.- write_
baseline - Promote a run to the baseline of its platform. The tracked copy carries no machine-local path; it is the run’s document as it is.