1 Commits

Author SHA256 Message Date
Alphaeus Mote b04bf93a70 perf: load benchmark for server sizing (tests/LoadBench)
A console program, not a test project and not run by CI. "run" hosts the
real backend (its messaging workers, job runner, message security and
enrollment, SQLite) against the NATS server at NATS_URL, enrolls N
devices through the real bootstrap endpoint (sealed or v1), and starts a
child process of simulated agents: each with the agent's own message
security and publisher, multiplexed over a few NATS connections, each
pulling its own durable command consumer. It measures a connect storm
(ready, settings pull, inventory, presence from every device within
20 s), steady state (presence every 30 s, inventory every 15 min) and a
job burst (a script to every device through the job runner, ~20 output
lines and two states each): CPU and memory of the server, the agents and
nats-server, messages per second, drops, and how long each takes.
"micro" times sealing and opening per message, and the job runner's
fan-out per device; "cleanup" removes consumers a stopped run left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:33:52 -05:00