Sign inSign up

ctwise/locust

By ctwise

•Updated about 7 years ago

locust.io load testing (based on christianbladescb/locustio)

Image
0

894

ctwise/locust repository overview

Use locust.io in docker, for great portability!

⁠Usage

Assuming you have a locustfile.py in the root of your project, make a Dockerfile like this:

FROM ctwise/locust

Then build and run the docker image:

$ docker build -t mylocust .
$ docker run --rm -P mylocust

Any requirements you have listed in your requirements.txt will be installed during the build, and locust runs locustfile.py by default!

⁠Run without building your own image

Alternatively, if you don't have a requirements.txt file, you can run a temporary, anonymous container by sharing your locustfile.py into it. Assuming you have a locustfile.py file in the current folder you're in, you can run with this command:

docker run --rm -v `pwd`:/locust -p 8089:8089 ctwise/locust --host http://mysite

You will also be able to access the web interface at http://localhost:8089⁠

⁠Master/Slave

If you want to run in master/slave mode, specify a different file to run, etc, you can pass the appropriate flags to the container.

$ docker run -d --name master -P mylocust -f otherlocustfile.py --host=http://foo.com --master
$ docker run -d --name slave --link master mylocust -f otherlocustfile.py --host=http://foo.com --slave --master-host=master 

Tag summary

Content type

Image

Digest

Size

131.3 MB

Last updated

about 7 years ago

docker pull ctwise/locust