init
This commit is contained in:
commit
4b0ca4a68d
|
@ -0,0 +1,30 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
master:
|
||||
image: locustio/locust:latest
|
||||
ports:
|
||||
- "8089:8089"
|
||||
volumes:
|
||||
- .:/mnt/locust
|
||||
working_dir: /mnt/locust
|
||||
command: -f locustfile.py --master -H http://master:8089
|
||||
networks:
|
||||
- locust
|
||||
|
||||
worker:
|
||||
image: locustio/locust:latest
|
||||
volumes:
|
||||
- .:/mnt/locust
|
||||
working_dir: /mnt/locust
|
||||
command: -f locustfile.py --worker --master-host master
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 4
|
||||
networks:
|
||||
- locust
|
||||
|
||||
|
||||
networks:
|
||||
locust:
|
||||
driver: bridge
|
|
@ -0,0 +1,7 @@
|
|||
from locust import HttpUser, task
|
||||
|
||||
|
||||
class HelloWorldUser(HttpUser):
|
||||
@task
|
||||
def hello_world(self):
|
||||
self.client.get("/")
|
Loading…
Reference in New Issue