Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Locust

$ locust Community Med Risk
Locust · Code & DevOps · MIT · macos / linux / windows

locust 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.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install locust
CLI vs MCP Decision CLI Only

Local distributed load-generation engine executing locustfile.py scenarios; MCP servers cannot substitute for high-concurrency traffic generation.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

--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-log emits clean JSON summary to stdout
Trust & Safety 19 / 25

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
Setup & Portability 12 / 15

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 gevent dependency
Utility & Efficiency 13 / 15

Expressive Python User scripting handles auth flows, stateful workflows, and distributed worker scaling.

  • Supports --json, --csv, --html, and master/worker distributed runs
Maintenance & Lineage 8 / 10

Actively maintained by the Locust project (locustio/locust) under MIT license.

  • Established open-source Python load tester
Docs & Verifiability 7 / 10

Comprehensive official documentation at docs.locust.io and clear --help flags.

  • Dedicated headless/CI docs at docs.locust.io

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key Config File
Credential Storage

Locust itself stores no credentials; target API credentials are supplied via locustfile.py, env vars, or locust.conf.

Side Effects
Read-Only Remote Write
Cost & Quotas

MIT open-source Python CLI; free (load tests may incur target hosting/egress costs).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Run a bounded headless load test against staging with JSON output
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

Run headless load test and export CSV stats
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-log returns structured latency, RPS, and failure stats directly to stdout.
  • + Full Python locustfile.py scripting supports realistic multi-step API flows.
  • + Exports --csv time-series and failure logs for post-run analysis.

Caveats & Pitfalls

  • ! Running without --headless starts 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.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI