Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.20.0
Load Testing
Uses Locust to simulate burst traffic against the API.
Run locally
pip install locust
locust -f tests/load/locustfile.py \
--host=http://localhost:8000 \
--users=20 \
--spawn-rate=2 \
--run-time=60s \
--headless
Environment variables
| Variable | Default | Description |
|---|---|---|
API_KEY |
test-key |
API key sent in X-API-Key header |
LOAD_TEST_REPO |
https://github.com/psf/requests |
Repo submitted for analysis |
Expected behaviour under load
/analyze/asyncshould handle 20 req/min per key before returning 429/api/v1/healthp99 should stay under 50ms- Worker queue depth should stabilise, not grow unboundedly