Skip to main content

Module bench

Module bench 

Source
Expand description

The benchmark projection: every externally callable operation of the registry, as a target, derived and never listed by hand. A capability with a required benchmark policy is a target directly and through every transport its exposure declares; the inputs come from its input type’s BenchmarkCases; the transports’ own operations (initialize, tools/list, /openapi.json, …) are system targets declared once in system. Coverage is covered / required with a generated denominator; the runners time targets through the executor, a real loopback socket and a real child process; the results are a versioned document; the accepted baseline is compared against a policy that is data.

Re-exports§

pub use results::BenchmarkResult;
pub use results::ResultDocument;
pub use results::RESULT_SCHEMA;

Modules§

baseline
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.
results
The result document: a versioned record of one benchmark run, with the provenance that makes it comparable (commit, dirty state, build profile, platform, registry fingerprint, profile) and, per target, the statistics of each cache mode measured. Local runs are written under the checkout’s local half; the accepted baseline is a tracked file of the same shape, minus the machine-local fields, promoted explicitly.

Structs§

BenchmarkProjection
Every target of a registry against one repository.
BenchmarkTarget
One thing to time.
Coverage
The coverage document.
CoverageLine
One requirement: a capability on a transport, or a system target.
Profile
How much to measure.
Runner
Times targets against one context.
Statistics
The statistics of one set of samples, in microseconds.

Enums§

CoverageState
Where one requirement stands.
SystemTarget
One system target.
TargetKind
What a target is. A data enum: the capability variant carries the case input and is the common one, so it is not boxed for the sake of the small system variant.
Transport
The way a target is reached.
View
Which reading of the repository a page request is answered from.