Implements issue #5: [Fenrir] Stress Test the Academy
Automated stress test tool that simulates multiple concurrent players
connecting to the MUD via telnet and performing random actions.
Features:
- Configurable concurrent players (--players, default 10)
- Configurable test duration (--duration, default 30s)
- Configurable actions per second per player (--actions-per-second, default 2)
- 14 weighted player actions: look, movement, examine, status,
map, academy, rooms, smell, listen, say
- Response time measurement with latency percentiles (p50/p90/p95/p99)
- Error rate tracking and top error reporting
- Throughput calculation (actions/second)
- Connection success/failure tracking
- Per-player statistics
- JSON report generation with timestamps
- Self-test mode (--self-test) for validation without server
- No external dependencies (stdlib only)
Usage:
python tests/stress_test.py --players 25 --duration 60
python tests/stress_test.py --host 167.99.126.228 --port 4000
python tests/stress_test.py --self-test