diff --git a/scripts/ci/locustfile.py b/scripts/ci/locustfile.py index d7a4123f3..984b0683c 100644 --- a/scripts/ci/locustfile.py +++ b/scripts/ci/locustfile.py @@ -30,21 +30,22 @@ class OSRMTasks(TaskSet): self.client.get(f"/route/v1/driving/{start_coord};{end_coord}?overview=full&steps=true") - # @task - # def get_table(self): - # num_coords = random.randint(3, 500) - # 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}") - # @task - # def get_match(self): - # track_id = random.choice(self.track_ids) - # track_coords = self.tracks[track_id] - # 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") @task def get_nearest(self): @@ -53,13 +54,13 @@ class OSRMTasks(TaskSet): self.client.get(f"/nearest/v1/driving/{coord_str}") - # @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") class OSRMUser(HttpUser): tasks = [OSRMTasks] diff --git a/scripts/ci/run_benchmarks.sh b/scripts/ci/run_benchmarks.sh index 6a40aa6b0..4a7a3e9c1 100755 --- a/scripts/ci/run_benchmarks.sh +++ b/scripts/ci/run_benchmarks.sh @@ -43,8 +43,8 @@ function run_benchmarks_for_folder { cat results_failures.csv echo "EXCEPTIONS: " cat results_exceptions.csv - echo "STATS HISTORY: " - cat results_stats_history.csv + # echo "STATS HISTORY: " + # cat results_stats_history.csv kill -0 $OSRM_ROUTED_PID