Skip to content

Commit

Permalink
locust: add page (tldr-pages#1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac authored and sbrl committed Oct 11, 2017
1 parent 4024334 commit ae695bd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pages/common/locust.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# locust

> Load-testing tool to determine number of concurrent users a system can handle.
- 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:

`locust --master --host={{http://example.com}}`

- Connect locust slave to master:

`locust --slave --host={{http://example.com}}`

- Connect locust slave to master on a different machine:

`locust --slave --master-host={{master_hostname}} --host={{http://example.com}}`

0 comments on commit ae695bd

Please sign in to comment.