Documentation
¶
Overview ¶
Command loadtest is the concurrent-load + latency benchmark harness. A p50/p95 measured one request at a time against a localhost upstream says nothing about contention; this drives N concurrent sessions (distinct delegated users, each minting its own root capability), each firing a burst of real HTTP tool calls at the actual running proxy, with real client-observed latency recorded - not simulated, not mocked.
It also exists to answer a second, more honest question than "is the proxy fast": how much does the proxy ITSELF add on top of whatever the real upstream enterprise API already takes to respond? cmd/mockupstream can simulate realistic upstream latency via MOCK_UPSTREAM_LATENCY_MS - run this harness once with that unset (0ms, isolates proxy overhead) and once with it set to something like 30-50ms (a realistic same-region API call), and compare GET /metrics' per-stage breakdown between runs. Proxy overhead (validate+policy+capability, excluding upstream_call) should stay essentially flat across both - if it doesn't, the proxy is adding hidden cost that scales with something it shouldn't.