Documentation
¶
Overview ¶
Command stagent-bench is the load benchmark for stagent (not shipped).
It creates an isolated installation (STAGENT_HOME in a temp dir), starts `stagent bridge` as the app would, spawns N detached sessions that each replay a TUI-like output stream (`stagent-bench replay`, a hidden helper mode of this binary), attaches to K of them in raw and in screen mode, and measures what the design targets in docs/agent-bridge-plan.md: daemon/holder memory (PSS) and CPU (Linux /proc), idle CPU, bytes sent to the app, attach-to-first-frame latency, output-to-client latency (timestamps are embedded in the stream) and conversations.list over 1,000 transcripts. With -usage-mb it also writes that many MiB of Claude transcripts and measures the daemon's first usage scan and usage.get over them.
go run ./cmd/stagent-bench -n 50 -k 1 -speed 10 go run ./cmd/stagent-bench -n 1 -k 0 -usage-mb 1024