Код: Выделить всё
locust --headless --users 10 --spawn-rate 1 -H http://localhost:3000
Код: Выделить всё
from locust import HttpUser, task
class HelloWorldUser(HttpUser):
@task
def hello_world(self):
self.client.get("/health")
Код: Выделить всё
locustfile = local.py
headless = true
master = true
expect-workers = 3
host = "http://localhost:3000"
users = 3
spawn-rate = 1
run-time = 1m
Код: Выделить всё
locust --config local.conf
Подробнее здесь: https://stackoverflow.com/questions/791 ... for-locust
Мобильная версия