add locust load testing

This commit is contained in:
badblocks 2025-04-19 17:11:19 -07:00
parent 6a44ef30a3
commit fb9b6dbb22
2 changed files with 20 additions and 0 deletions

18
locustfile.py Normal file
View 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"})

View file

@ -18,7 +18,9 @@ django-meta==2.4.2
django-silk==5.3.1
django-tailwind-4[reload]==0.1.4
django-widget-tweaks==1.5.0
gevent==25.4.1
gunicorn==23.0.0
granian==2.2.5
idna==3.4
imgkit==1.2.3
oauthlib==3.2.2