add locust load testing
This commit is contained in:
parent
6a44ef30a3
commit
fb9b6dbb22
2 changed files with 20 additions and 0 deletions
18
locustfile.py
Normal file
18
locustfile.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import time
|
||||
from locust import HttpUser, task, between
|
||||
|
||||
class QuickstartUser(HttpUser):
|
||||
wait_time = between(1, 5)
|
||||
|
||||
@task
|
||||
def healthcheck_get(self):
|
||||
self.client.get("/health")
|
||||
|
||||
# @task
|
||||
# def view_cards(self):
|
||||
# for item_id in range(22):
|
||||
# self.client.get(f"/cards/?page={item_id}", name="/cards/")
|
||||
# time.sleep(1)
|
||||
|
||||
# def on_start(self):
|
||||
# self.client.post("/login", json={"username":"foo", "password":"bar"})
|
||||
Loading…
Add table
Add a link
Reference in a new issue