Locust
$ locust Community Med Risklocust lets developers define realistic user load behaviors in Python (locustfile.py) and drive concurrent HTTP/protocol traffic. Passing --headless --json --skip-log runs bounded load tests without launching the web UI and prints structured JSON summary stats to stdout.
brew install locust Local distributed load-generation engine executing locustfile.py scenarios; MCP servers cannot substitute for high-concurrency traffic generation.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
--headless --json --skip-log gives bounded non-interactive runs with clean JSON stats on stdout, though omitting --headless launches a blocking web server.
--headless -t <time>guarantees bounded execution--json --skip-logemits clean JSON summary to stdout
Load testing generates concurrent network requests (remote_write if tasks POST/PUT) and can overwhelm targets if -u or -t are misconfigured.
- Concurrent traffic generation requires explicit target scoping
Available via brew install locust and pip install locust on macOS, Linux, and Windows (gevent wheels required on some platforms).
- Cross-platform Python package with
geventdependency
Expressive Python User scripting handles auth flows, stateful workflows, and distributed worker scaling.
- Supports
--json,--csv,--html, and master/worker distributed runs
Actively maintained by the Locust project (locustio/locust) under MIT license.
- Established open-source Python load tester
Comprehensive official documentation at docs.locust.io and clear --help flags.
- Dedicated headless/CI docs at docs.locust.io
Security, Auth & Guardrails
Locust itself stores no credentials; target API credentials are supplied via locustfile.py, env vars, or locust.conf.
MIT open-source Python CLI; free (load tests may incur target hosting/egress costs).
# Locust Agent Rules - Always pass `--headless -t <duration>` so tests terminate automatically instead of starting the Web UI. - Never point `locust` at production URLs without explicit user approval; test against `localhost` or staging. - Pair `--json` with `--skip-log` so stdout stays valid JSON.
Agent-Ready Command Recipes
Safe Read-Only Queries
locust -f locustfile.py --headless -u 10 -r 2 -t 15s -H http://localhost:8080 --json --skip-log
Simulates 10 concurrent users for 15 seconds against local staging and emits clean JSON summary metrics.
Controlled Writes & Previews
locust -f locustfile.py --headless -u 20 -r 5 -t 30s -H http://localhost:8080 --csv=reports/load --only-summary
Writes reports/load_stats.csv, reports/load_stats_history.csv, and reports/load_failures.csv.
Strengths for Agents
- +
--headless --json --skip-logreturns structured latency, RPS, and failure stats directly to stdout. - + Full Python
locustfile.pyscripting supports realistic multi-step API flows. - + Exports
--csvtime-series and failure logs for post-run analysis.
Caveats & Pitfalls
- ! Running without
--headlessstarts an interactive Web UI server on port 8089 and blocks. - ! High user counts (
-u) against remote hosts can cause service degradation or unwanted write mutations.