diff --git a/scripts/ci/locustfile.py b/scripts/ci/locustfile.py index 0868df6df..00c09f3ce 100644 --- a/scripts/ci/locustfile.py +++ b/scripts/ci/locustfile.py @@ -28,39 +28,39 @@ class OSRMTasks(TaskSet): start_coord = f"{start[1]:.6f},{start[0]:.6f}" end_coord = f"{end[1]:.6f},{end[0]:.6f}" - self.client.get(f"/route/v1/driving/{start_coord};{end_coord}?overview=full&steps=true", name="/route/v1/driving") + self.client.get(f"/route/v1/driving/{start_coord};{end_coord}?overview=full&steps=true", name="driving") - # @task - # def get_table(self): - # num_coords = random.randint(3, 250) - # selected_coords = random.sample(self.coordinates, num_coords) - # coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in selected_coords]) + @task + def get_table(self): + num_coords = random.randint(3, 250) + selected_coords = random.sample(self.coordinates, num_coords) + coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in selected_coords]) - # self.client.get(f"/table/v1/driving/{coords_str}") + self.client.get(f"/table/v1/driving/{coords_str}", name="table") - # @task - # def get_match(self): - # num_coords = random.randint(3, 250) - # track_id = random.choice(self.track_ids) - # track_coords = self.tracks[track_id][:num_coords] - # coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in track_coords]) + @task + def get_match(self): + num_coords = random.randint(3, 250) + track_id = random.choice(self.track_ids) + track_coords = self.tracks[track_id][:num_coords] + coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in track_coords]) - # self.client.get(f"/match/v1/driving/{coords_str}?steps=true") + self.client.get(f"/match/v1/driving/{coords_str}?steps=true", name="match") - # @task - # def get_nearest(self): - # coord = random.choice(self.coordinates) - # coord_str = f"{coord[1]:.6f},{coord[0]:.6f}" + @task + def get_nearest(self): + coord = random.choice(self.coordinates) + coord_str = f"{coord[1]:.6f},{coord[0]:.6f}" - # self.client.get(f"/nearest/v1/driving/{coord_str}") + self.client.get(f"/nearest/v1/driving/{coord_str}", name="nearest") - # @task - # def get_trip(self): - # num_coords = random.randint(2, 10) - # selected_coords = random.sample(self.coordinates, num_coords) - # coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in selected_coords]) + @task + def get_trip(self): + num_coords = random.randint(2, 10) + selected_coords = random.sample(self.coordinates, num_coords) + coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in selected_coords]) - # self.client.get(f"/trip/v1/driving/{coords_str}?steps=true") + self.client.get(f"/trip/v1/driving/{coords_str}?steps=true", name="trip") class OSRMUser(HttpUser): tasks = [OSRMTasks] diff --git a/scripts/ci/run_benchmarks.sh b/scripts/ci/run_benchmarks.sh index 884ec80ad..ae7ae827d 100755 --- a/scripts/ci/run_benchmarks.sh +++ b/scripts/ci/run_benchmarks.sh @@ -47,13 +47,15 @@ function run_benchmarks_for_folder { echo "STATS: " cat results_stats.csv - echo "FAILURES: " - cat results_failures.csv - echo "EXCEPTIONS: " - cat results_exceptions.csv + # echo "FAILURES: " + # cat results_failures.csv + # echo "EXCEPTIONS: " + # cat results_exceptions.csv # echo "STATS HISTORY: " # cat results_stats_history.csv - +# 2024-05-26T16:48:29.2826130Z Type,Name,Request Count,Failure Count,Median Response Time,Average Response Time,Min Response Time,Max Response Time,Average Content Size,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100% +# 2024-05-26T16:48:29.2827761Z GET,/route/v1/driving,7668,0,4,15.894057099894761,1.168323000001692,137.2044539999706,26387.300208659362,127.83539601258259,0.0,4,6,44,45,47,48,49,50,100,140,140 +# 2024-05-26T16:48:29.2829001Z ,Aggregated,7668,0,4,15.894057099894761,1.168323000001692,137.2044539999706,26387.300208659362,127.83539601258259,0.0,4,6,44,45,47,48,49,50,100,140,140 kill -0 $OSRM_ROUTED_PID fi