feat: tp5, pas fini (7.4 commencé)

This commit is contained in:
Emi BOUCLY 2025-11-12 16:51:07 +01:00
parent 1fef95a37f
commit 83775e9dc0
18 changed files with 466 additions and 0 deletions

21
tp5/locustfile.py Normal file
View file

@ -0,0 +1,21 @@
import time
from locust import HttpUser, task, between
class QuickstartUser(HttpUser):
wait_time = between(1, 5)
@task
def missions(self):
self.client.get("/")
@task
def enseignants(self):
self.client.get("/enseignants")
@task
def view_missions(self):
for mission_id in range(1, 6):
self.client.get(f"/mission/{mission_id}")
time.sleep(1)