Load Testing With Locust
See locust docs:
helm repo add locust 'https://raw.githubusercontent.com/hansehe/locust/master/helm/charts'
helm install locust locust/locust --version 0.1.0
pip install -r src/requirements.txt
Run cmd below and locate locust at http://localhost:8089/
cd src/
locust -f locustfile.py
See official documentation:
cd src/
locust -f locustfile.py --no-web -c 10 -r 10 --run-time 1h30m --stop-timeout 99
# or
python main.py
-c
specifies the number of Locust clients to spawn, and -r
specifies the hatch rate (number of clients to spawn per second).
Run With DockerBuildManagement & Docker
Change or expose any of the environment variables in src/.env
pip install --upgrade DockerBuildManagement
Locate locust at http://localhost:8089/
dbm -build -run service
dbm -test service
dbm -build -publish