mix malachi. loadtest
(malachi v0.22.7)
View Source
Multi-core Elixir load generator for a running Malachi server.
One BEAM process per connection, so N connections use every scheduler (unlike a single-threaded client). Connects to an already-running server over the binary wire protocol and drives load.
mix malachi.loadtest --scenario produce --connections 512 --batch 10 --duration 10Options
--scenarioproduce | fetch | mixed | stream | user | acl (default produce)--connectionsconcurrent connections (128)--durationmeasured seconds (10),--warmupseconds excluded (2)--batchrecords per produce (10),--record-sizebytes (256),--keyscardinality (1000)--pipelinein-flight requests per connection, produce only (1 = closed-loop)--maxrecords per fetch/push (100),--windowstream credit (100)--prepopulaterecords to seed before fetch/stream/mixed (10000 for those)--topic(auto),--topicsdistinct topics to fan out over (1); N > 1 spreads load across data-plane shards--host(127.0.0.1); accepts a comma-separated list for a cluster (connections round-robin across the hosts),--port(4040)--connect-strategybounded | stagger | all-at-once (default bounded): how the connections are opened, since each one pays a server-side credential verification and opening hundreds at once is an auth storm. bounded keeps at most--connect-concurrency(32) connects in flight; stagger delays connection i byi * --connect-stagger-ms(100); all-at-once opens everything together. Each pacing knob is only accepted with the strategy that reads it.- auth:
--user(admin)--pass(admin123), or--token, or--tls/--cacert/--cert/--key --tlsverifies the server's certificate and hostname against--cacert, or against the system trust store when none is given.--insecureskips that verification: development only, since it makes the connection encrypted but unauthenticated and therefore open to interception.--payloadconstant | json | random (default constant): what the record values are. constant is one repeated byte, as every published series so far; json is a seeded, event-like JSON document of exactly--record-sizebytes (at least 149); random is seeded noise, the incompressible control.--payload-seed(1) picks the values and is only accepted with json or random. SeeMalachi.Loadtest.Payload.--jsonemit the report as JSON--measure-markera path created (empty) the moment the measured window begins, after every connection has authenticated and the warmup has ended, so a harness can sample CPU over that window alone. Its directory must exist. Left out of the recorded command, since it is plumbing for the caller rather than part of the run.