tldr/pages/common/locust.md

29 lines
816 B
Markdown
Raw Normal View History

2017-10-11 11:29:29 +01:00
# locust
> Load-testing tool to determine number of concurrent users a system can handle.
2019-06-05 08:55:55 +01:00
> More information: <https://locust.io>.
2017-10-11 11:29:29 +01:00
- Load-test "example.com" with web interface using locustfile.py:
`locust --host={{http://example.com}}`
- Use a different test file:
`locust --locustfile={{test_file.py}} --host={{http://example.com}}`
- Run test without web interface, spawning 1 user a second until there are 100 users:
`locust --no-web --clients={{100}} --hatch-rate={{1}} --host={{http://example.com}}`
- Start Locust in master mode:
2017-10-11 11:29:29 +01:00
`locust --master --host={{http://example.com}}`
- Connect Locust slave to master:
2017-10-11 11:29:29 +01:00
`locust --slave --host={{http://example.com}}`
- Connect Locust slave to master on a different machine:
2017-10-11 11:29:29 +01:00
`locust --slave --master-host={{master_hostname}} --host={{http://example.com}}`