This is a basic test suite load gen tester built on locust.io
- Deploy an Atlas cluster
- Create a username and password
- Add your IP address to your IP Access List
- Press the connect button and choose "Connect your Application" then "Python" and make note of the connection string for later
- Edit locustfile and copy the one function in there to do whatever you want
- Today this will create 11k docs with a random ID and binary payload and store them via upsert
- Use the
tag
directive for identifying the function within the Locust UI - Use the
task
directive for task frequency (i.e. 2 will happen half as frequently as 1) - Add any python packages to the requirements.txt file
- The build.sh and compose reference my DockerHub username. If you aren't me, change instances of
graboskyc
- Locust uses the same container for the master and workers
- Run the build.sh in bash to create the containers locally. It will auto tag it with an auto-incrementing version number and latest tags
- Copy the worker-variables.sample.env to
worker-variables.env
- modify the
MDBCONNSTRING
field with your Atlas connection string
- Run the run.sh and this will start the load test
- Hard coded in that script it will launch one
master
and 2workers
which you can modify in that script - Open a web browser to
http://localhost:8089
- Return to console and press control+c to end the compose stack