From 8c907a218ef713809c7b991e325f37c0a0d1bf7d Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sun, 26 May 2024 13:07:45 +0200 Subject: [PATCH] Implement end-to-end benchmark --- locustfile.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 locustfile.py diff --git a/locustfile.py b/locustfile.py new file mode 100644 index 000000000..0999f69bd --- /dev/null +++ b/locustfile.py @@ -0,0 +1,15 @@ +from locust import HttpUser, TaskSet, task, between + +class OSRMTasks(TaskSet): + @task + def get_route(self): + # Define the coordinates for the route + start = "13.388860,52.517037" + end = "13.397634,52.529407" + + # Make a request to the OSRM route service + self.client.get(f"/route/v1/driving/{start};{end}?overview=false") + +class WebsiteUser(HttpUser): + tasks = [OSRMTasks] + wait_time = between(1, 5)