Skip to main content

Module scenario

Module scenario 

Source
Expand description

Scenario is the on-disk YAML schema the driver reads. RunOutput is the on-disk JSON schema the driver writes. The report aggregator reads RunOutput documents and writes Markdown.

§Encoding of dimensioned fields

Every size, extent, and rate here is a [krabka_units] quantity, and each carries an explicit #[serde(with = ...)] so the file never holds a bare base-unit float. The scenario an operator writes uses the human form (msg_size: 1KiB, linger: 5ms, rate: 20000/s), which refuses a bare number. A guess about whether 5 is seconds or milliseconds is the mistake the types prevent. The measured output uses the exact integer form, nanoseconds for latencies and bytes for sizes, so the numbers a report compares or plots survive the round trip unrounded.

Epoch timestamps (wallclock_*_unix_ms, Disturbance::kill_at_ms) stay raw integers, because they are coordinates and not magnitudes.

The private bounded module below also range-checks every input magnitude as the driver reads it, so a scenario file that asks for something unrunnable fails at load and not at the far end of the driver.

Structs§

BrokerSample
One time-series sample of broker resource usage, scraped from Prometheus as a range query over the run window.
Disturbance
FailoverSpec
Inject a broker kill mid-scenario to measure failover behaviour.
LatencyPercentiles
Latency percentiles as measured extents, encoded as whole nanoseconds.
Resource
RunOutput
One run = one scenario × one stack. The driver writes it and the report aggregator reads it.
Sample
One time-series sample of client-side throughput and latency over a fixed interval of the measurement window.
Scenario
The scenario configuration. The driver loads it from YAML and echoes it back into RunOutput.scenario for the report.
Throughput
Topology

Enums§

Acks
Compression
LoadMode
ModeTag
Stack
Which Kafka stack the scenario runs against. This is metadata only. The driver’s client behaviour is the same for both, because Krabka’s wire-compatible client speaks to either broker.