diff --git a/locustfile.py b/locustfile.py new file mode 100644 index 0000000..042280a --- /dev/null +++ b/locustfile.py @@ -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"}) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index d83527e..7d7259e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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