Struct BenchmarkPass
pub struct BenchmarkPass { /* private fields */ }bench only.Expand description
One measured pass within a scenario.
A scenario reports one pass per thing it did that a decision could be made about — the seeding append, the contended append, each of the two replays — so a reader can tell “the workload ran and this is what it cost” from “the workload never happened”.
The counters are deliberately counts and not durations. Nothing under
crates/happenstance-testkit/src may read a clock (CF-33), so the elapsed
time of a pass is the caller’s emitter’s to produce and to report beside
this record.
Implementations§
§impl BenchmarkPass
impl BenchmarkPass
pub const fn label(&self) -> &'static str
pub const fn label(&self) -> &'static str
What this pass measured — "append", "seed", "contend",
"replay-all" or "replay-tagged".
pub const fn rejected(&self) -> usize
pub const fn rejected(&self) -> usize
How many lost a race, as ConditionViolated.
The number ADR-0012 asked this instrument for: a contended run whose rejection count is zero measured no contention, whatever its timing said.
pub const fn refused(&self) -> usize
pub const fn refused(&self) -> usize
How many met a stated store limit.
Limits are declared facts about a fixture rather than trades, so a benchmark meeting one is a legitimate outcome that has to be legible in the output — never counted as completed work, and never a panic.
pub const fn failed(&self) -> usize
pub const fn failed(&self) -> usize
How many failed for a transport or store reason.
Kept apart from rejected for the reason
concurrency::Attempt keeps them apart: collapsing the two would let a
broken store report a perfect rejection mix.
pub const fn is_well_formed(&self) -> bool
pub const fn is_well_formed(&self) -> bool
Whether every attempt is accounted for by exactly one counter.