Expand description
Load driver and report aggregator for the Krabka vs Strimzi benchmark harness on Kubernetes.
Scenarios describe a target Kafka stack, a workload shape, and optional
disturbance windows. The driver applies the scenario to Kubernetes, runs
the producer/consumer load, samples Prometheus, and writes a RunOutput
JSON artifact. The report binary reads those artifacts back and renders
the side-by-side Markdown summary used in benchmark reports.
The crate ships two binaries:
krabka-bench-driver— runs one scenario against one Kafka stack, either Krabka or Strimzi/Kafka. It captures throughput, latency, and disturbance data, queries Prometheus for resource usage, and writes a singleRunOutputJSON file.krabka-bench-report— walks a directory ofRunOutputfiles, groups them by scenario name, and writes a side-by-side Markdown summary.
§Dimensioned values
Sizes, durations, and rates are [krabka_units] quantities throughout, and
not bare numbers. A scenario’s msg_size is a ByteSize, its linger and
duration are a Time, and a paced run’s rate is a Frequency. The
operator writes them with units (512B, 5ms, 20000/s), and the measured
RunOutput encodes them as exact integers. See scenario for the
encoding of each field, and the code style guide for the vocabulary.
§Command-line workflow
krabka-bench-driver \
--scenario bench/scenarios/small-msg-saturate.yaml \
--stack krabka \
--namespace kafka-bench \
--out runs/krabka-steady.json
krabka-bench-report --input runs --out report.md§Programmatic report aggregation
use {krabka_bench_driver::report, std::path::Path};
let markdown = report::render_markdown(Path::new("runs"), true)?;
std::fs::write("report.md", markdown)?;Modules§
- aggregate
- Cross-run aggregation, the “accurate averages” layer.
- failover
- Kill-broker orchestration for the
failoverscenario. - graph
- Plotly HTML graph rendering for the benchmark report.
- hist
- HDR histogram helpers.
- ids
- Newtypes over the bare integers that the driver and report layers thread around.
- payload
- Record-payload generator.
- prom
- Prometheus query client.
- qualification
- Failover evidence checks and recovery analysis for benchmark runs.
- rate
- Token-bucket pacer for
FixedRatescenarios.saturatemode never calls this. It onlyawaits the producer’s natural backpressure. - report
- Aggregate per-run JSON outputs into a single Markdown summary.
- scenario
Scenariois the on-disk YAML schema the driver reads.RunOutputis the on-disk JSON schema the driver writes. The report aggregator readsRunOutputdocuments and writes Markdown.- soak
- The sustained-load and failure contract, and the judge that grades a run against it.
- workload
- Producer and consumer workload runners.