Load test tool Easy to define in Python
Python3.7 locust 1.3.1
$ pip install locust
from locust import HttpUser, TaskSet, task, between, constant
class UserBehavior(TaskSet):
@task(1)
def search(self):
self.client.get("/hoge", verify=False)
class WebsiteUser(HttpUser):
tasks = {UserBehavior:1}
wait_time = constant(0)
$ locast
Access http: // localhost: 8089 / with a browser
Settings are from top to bottom
Number of total users to simulate Spawn rate (number of users increasing per second) Host (URL to be load tested)
Run with Start swarming
https://locust.io/ https://qiita.com/naoki114/items/7ae5a045bb08c4950b04
Recommended Posts