Creating repository for loadtesting using locust.

Divick 0984119981 Committing the first version / sample of locust. 5 years ago
common 0984119981 Committing the first version / sample of locust. 5 years ago
locustfiles 0984119981 Committing the first version / sample of locust. 5 years ago
.gitignore 47a37ee6c0 Initial commit 5 years ago
README.md 0984119981 Committing the first version / sample of locust. 5 years ago
requirements.txt 0984119981 Committing the first version / sample of locust. 5 years ago
run.sh 0984119981 Committing the first version / sample of locust. 5 years ago

README.md

loadtest

How to run

  1. Create a virtualenv using directly virtualenv or virtualenvwrapper mkvirtualenv loadtest
  2. Install packages in requirements.txt pip install -r requirements.txt
  3. Run using run.sh

Argument -n controls the number of requests. infinitely.

Argument -c controls the number of client

Argument -r controls the number of users spawned/sec

Argument -h specifiies the host to run the load test against.

    ./run.sh -n=2000 -c=1000 -r=10 -h=http://192.168.10.10:8000/api

The above command will run the request against host 192.168.10.10 with 1000 clients with 10 clients spawned / sec, ramping up to 1000 clients and will end after 2000 requests. If -n argument is not specified, it will run infinitely.

You can also run the locust script without --no-web argument in which case you can browse to http://127.0.0.1:8089 and directly specify the number of clients to spawn and the hatch rate and the results will be shown graphically in the browser.