Skip to main content

Module contract

Module contract 

Source
Expand description

The regression contract: the workload matrix and the budgets that a performance comparison is judged by.

The contract is declared before any trial runs. The harness records the SHA-256 of the contract’s bytes when it starts, and evaluate refuses a record whose digest does not match the contract it is handed. A budget edited after the numbers are in therefore cannot judge them.

Structs§

Budget
The materiality and variance budget for one metric.
Cell
One workload in the matrix.
Cluster
The cluster shape every trial runs against.
Contract
The whole regression contract.
ModePolicy
What a mode gates on beyond correctness and variance.

Enums§

BudgetError
Errors from loading a contract, assembling a record, or evaluating one.
Direction
Which way a metric gets better.
Metric
A quantity every completed trial reports.
Mode
What a comparison measures the candidate against.
Payload
How a cell’s record values are filled.

Constants§

FORMAT_VERSION
The only contract and record format version this crate reads and writes.
MINIMUM_RECORD_BYTES
The smallest record the workload can carry: it writes an 8-byte send timestamp and an 8-byte sequence number into every value.
MINIMUM_ROUNDS
The fewest interleaved rounds a contract may declare. The criterion lane’s compare_summaries has the same floor: a median absolute deviation over fewer than three samples says nothing.

Functions§

contract_digest
The lowercase hex SHA-256 of a contract’s bytes, as sha256sum prints it.