pub struct Stats {
pub accepted_cases: usize,
pub rejected_cases: usize,
pub total_samples: usize,
}Expand description
Observability data from a Runner::run invocation.
Read from a Runner after the run returns via
Runner::stats, and also embedded in
RunError on failure so the caller can see how far
the run progressed before it failed. All counters are cumulative over
the whole run (across every case, accepted or rejected).
Fields§
§accepted_cases: usizeNumber of cases whose closure completed without calling
TestCaseContext::reject_case. On
a successful run, this equals
cases. On failure, it is
the number of cases that passed before the failing one
(equivalent to RunError::case_index).
rejected_cases: usizeTotal number of cases discarded via
TestCaseContext::reject_case, including
exhausted sample_with_rejection
helpers (they discard via reject_case internally, so the two
origins share this single counter).
total_samples: usizeTotal number of top-level sample_* invocations across every
case that ran. Counted per call to the primitive generator
(sample_u32, sample_choice, sample_string, …), not per
underlying byte read or dedup entry — a sample_char invocation
that internally retries its 21-bit mask still counts as one
sample. Includes samples produced by rejected cases, since
those cases still consumed generator budget.