Skip to content

Commit fd0ec6d

Browse files
committed
add locust basic file
1 parent 02b4458 commit fd0ec6d

File tree

6 files changed

+961
-5
lines changed

6 files changed

+961
-5
lines changed

doc/locust.png

112 KB
Loading

justfile

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ fix-qa:
88

99
test:
1010
poetry run pytest
11+
12+
load_test:
13+
cd tests/load_test && locust

poetry.lock

+946-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ build-backend = "poetry.core.masonry.api"
1818
pytest = "^8.3.4"
1919
ruff = "^0.9.4"
2020
testcontainers = {extras = ["generic"], version = "^4.9.1"}
21+
locust = "^2.32.8"
2122

2223

2324
[tool.poetry.dependencies]

tests/load_test/__init__.py

Whitespace-only changes.

tests/load_test/locustfile.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from locust import HttpUser, task
2+
3+
class HelloWorldUser(HttpUser):
4+
host = "http://localhost"
5+
6+
@task
7+
def hello_world(self):
8+
self.client.get("/api/v1/haveibeenrocked/b6855")
9+
10+
# TODO ideally we should have something like
11+
# 90% of hash prefix been requested in a set of 10k password and rest of them random

0 commit comments

Comments
 (0)