Load testing tool for Dalgo dashboard APIs using Locust.
-
Copy environment configuration:
cp .env.example .env
-
Update
.env
with your credentials:# Edit .env file with your actual values [email protected] DALGO_PASSWORD=your-password DALGO_ORG_SLUG=your-org-slug DALGO_HOST=http://localhost:8002
-
Install dependencies:
uv sync
# Use default settings from .env
python main.py
# Custom test with 50 users, 5/sec spawn rate, 10 minutes
python main.py -u 50 -s 5 -t 10m
# Test against production
python main.py --host https://api.dalgo.in --users 20
# Run with web UI for real-time monitoring
python main.py --web-ui
python main.py -h # Show help
Options:
-u, --users Number of concurrent users (default: from .env)
-s, --spawn-rate Rate to spawn users per second (default: from .env)
-t, --time Test duration (e.g., 5m, 30s, 1h) (default: from .env)
--host Backend host URL (default: from .env)
--web-ui Run with web UI instead of headless mode
Each simulated user follows this realistic flow:
- Login via API with credentials from .env
- Fetch Dashboards - Get list of available dashboards
- Select Dashboard - Pick one randomly and extract charts
- Repeatedly Hit APIs with different frequencies:
- Dashboard data refresh (highest frequency)
- Individual chart data refresh (high frequency)
- Dashboard config requests (medium frequency)
After each test run, you'll get:
- HTML Report:
dashboard_load_test_TIMESTAMP.html
- Visual performance report - CSV Reports:
dashboard_load_test_TIMESTAMP_*.csv
- Raw data for analysis
Variable | Description | Example |
---|---|---|
DALGO_USERNAME |
Your Dalgo login email | [email protected] |
DALGO_PASSWORD |
Your Dalgo password | your-password |
DALGO_ORG_SLUG |
Organization slug | test_auto |
DALGO_HOST |
Backend API URL | http://localhost:8002 |
DEFAULT_USERS |
Default concurrent users | 10 |
DEFAULT_SPAWN_RATE |
Default spawn rate | 2 |
DEFAULT_DURATION |
Default test duration | 5m |
30s
= 30 seconds5m
= 5 minutes1h
= 1 hour90m
= 90 minutes