Update locustfile.py

This commit is contained in:
Siarhei Fedartsou 2024-05-28 23:33:04 +02:00 committed by GitHub
parent 8a45f73818
commit 453794d951
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ class OSRMTasks(TaskSet):
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])
radiues_str = ";".join([f"10" for _ in range(num_coords)])
radiues_str = ";".join([f"5" for _ in range(num_coords)])
with self.client.get(f"/match/v1/driving/{coords_str}?steps=true&radiuses={radiues_str}", name="match", catch_response=True) as response:
if response.status_code == 400: