Skip to main content

krabka_bench_driver/
soak.rs

1//! The sustained-load and failure contract, and the judge that grades a run
2//! against it.
3//!
4//! A soak in this repository is three things kept apart on purpose:
5//!
6//! - a [`contract`], a YAML file under `bench/soak/` that declares every limit
7//!   before the run: host, disk, seed, client settings, throughput targets,
8//!   latency budgets, recovery deadlines and the fault plan;
9//! - an executor, the `soak_contract` suite of `krabka-broker`, which runs the
10//!   contract's load against an isolated three-broker cluster, injects its
11//!   faults and records [`evidence`];
12//! - this judge, which reads the two back and returns a [`verdict`].
13//!
14//! A disaster-recovery contract is executed by `krabka-soak-drill`, through
15//! [`drill`], inside the qualification drill instead: it runs the same load
16//! through a capture and the loss of the source cluster, and reads back the
17//! cluster restored from the capture. [`recovery`] places every record on its
18//! side of the capture boundary and measures the recovery point and recovery
19//! time.
20//!
21//! [`client`] is the half both executors share: the producers, the live
22//! consumers and the read-back. It does IO, and the judge never calls it.
23//!
24//! The judge is pure: it does no IO and owns no clock, so every rule it applies
25//! is unit-tested here against evidence whose answer is known. The executor
26//! only measures. `krabka-soak-check` is the command-line front end, and its
27//! `self-check` proves the judge catches an injected missing record and an
28//! injected missed deadline.
29//!
30//! The design document is `crates/bench-driver/docs/soak-contract-design.md`.
31
32pub mod client;
33pub mod contract;
34pub mod deadline;
35pub mod drill;
36pub mod evidence;
37pub mod ledger;
38pub mod lifecycle;
39pub mod reconcile;
40pub mod recovery;
41pub mod schedule;
42pub mod synthetic;
43pub mod verdict;