Malachi.Loadtest (malachi v0.8.13)

View Source

A multi-core wire-protocol load generator: one BEAM process per connection, so N connections spread across all schedulers (unlike a single-threaded event loop). It drives produce/fetch/mixed/stream load and control-plane (user/acl) load against a running Malachi server, measuring throughput and latency.

run/1 is the entry point (the mix malachi.loadtest task is a thin wrapper). Metrics are collected lock-free: an :counters array for ops/records/errors plus backpressure events (dropped connections, server-shed overloaded produces, and reconnects) and a Malachi.Loadtest.Histogram for latency. A worker connects and authenticates, waits at a barrier so all connections start together, runs its scenario for warmup + duration, and records only during the measured window. It is resilient: a shed produce backs off and continues, and a dropped connection reconnects (capped) rather than aborting.

Summary

Functions

Runs a load test and returns the report map. See the moduledoc / the mix malachi.loadtest task for options; all are optional with sensible defaults.

Functions

run(opts \\ [])

@spec run(keyword()) :: map()

Runs a load test and returns the report map. See the moduledoc / the mix malachi.loadtest task for options; all are optional with sensible defaults.