Two ramped-concurrency exercisers for POST /search/contents plus a flat 290-query list (58 topics x 5 templates) for feeding external harnesses. Endpoint/key come from LWSS_BASE/LWSS_KEY env vars; no secrets committed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
LWSS load tests
Ramped-concurrency exercisers for the live MCP endpoint. They hit
POST /search/contents (the full search → render → extract path — the part
that actually saturates under load) at increasing concurrency and report
latency + per-page render yield.
Setup
Both scripts read the endpoint and bearer key from the environment — no secrets are committed:
export LWSS_BASE="https://websearch.neilbantoc.dev" # or your own endpoint
export LWSS_KEY="<your MCP bearer key>"
pip install httpx
Scripts
loadtest.py— 36 hand-written natural queries, ramps1,3,6,10,16,20. Reuses queries across levels (some cache hits expected at higher N).loadtest2.py— 290 unique queries (58 topics × 5 templates) so nothing hits cache; ramps1,4,8,12,16,20. Best for measuring the true render ceiling. EditLEVELSto push harder.queries.txt— the 290 unique queries, one per line. Feed this straight into opencode / a local model / your own harness.
Reference numbers (2026-07, single-node deploy)
Clean cliff between 8 and 12 concurrent content-searches: ≤8 is ~2s with
100% page yield; at 12+ latency hits the 60s stage timeout and yield drops
(92% → 72%). Zero errors at every level — degrades gracefully, never breaks.
The bottleneck is the Playwright renderer (each content-search fans out to 5
page renders), tunable via the renderer's cpus / browser-context pool.