wip
This commit is contained in:
parent
030cdefcf0
commit
64b6f90212
@ -28,39 +28,39 @@ class OSRMTasks(TaskSet):
|
|||||||
start_coord = f"{start[1]:.6f},{start[0]:.6f}"
|
start_coord = f"{start[1]:.6f},{start[0]:.6f}"
|
||||||
end_coord = f"{end[1]:.6f},{end[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
|
@task
|
||||||
# def get_table(self):
|
def get_table(self):
|
||||||
# num_coords = random.randint(3, 250)
|
num_coords = random.randint(3, 250)
|
||||||
# selected_coords = random.sample(self.coordinates, num_coords)
|
selected_coords = random.sample(self.coordinates, num_coords)
|
||||||
# coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in selected_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
|
@task
|
||||||
# def get_match(self):
|
def get_match(self):
|
||||||
# num_coords = random.randint(3, 250)
|
num_coords = random.randint(3, 250)
|
||||||
# track_id = random.choice(self.track_ids)
|
track_id = random.choice(self.track_ids)
|
||||||
# track_coords = self.tracks[track_id][:num_coords]
|
track_coords = self.tracks[track_id][:num_coords]
|
||||||
# coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in track_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
|
@task
|
||||||
# def get_nearest(self):
|
def get_nearest(self):
|
||||||
# coord = random.choice(self.coordinates)
|
coord = random.choice(self.coordinates)
|
||||||
# coord_str = f"{coord[1]:.6f},{coord[0]:.6f}"
|
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
|
@task
|
||||||
# def get_trip(self):
|
def get_trip(self):
|
||||||
# num_coords = random.randint(2, 10)
|
num_coords = random.randint(2, 10)
|
||||||
# selected_coords = random.sample(self.coordinates, num_coords)
|
selected_coords = random.sample(self.coordinates, num_coords)
|
||||||
# coords_str = ";".join([f"{coord[1]:.6f},{coord[0]:.6f}" for coord in selected_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):
|
class OSRMUser(HttpUser):
|
||||||
tasks = [OSRMTasks]
|
tasks = [OSRMTasks]
|
||||||
|
@ -47,13 +47,15 @@ function run_benchmarks_for_folder {
|
|||||||
|
|
||||||
echo "STATS: "
|
echo "STATS: "
|
||||||
cat results_stats.csv
|
cat results_stats.csv
|
||||||
echo "FAILURES: "
|
# echo "FAILURES: "
|
||||||
cat results_failures.csv
|
# cat results_failures.csv
|
||||||
echo "EXCEPTIONS: "
|
# echo "EXCEPTIONS: "
|
||||||
cat results_exceptions.csv
|
# cat results_exceptions.csv
|
||||||
# echo "STATS HISTORY: "
|
# echo "STATS HISTORY: "
|
||||||
# cat results_stats_history.csv
|
# 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
|
kill -0 $OSRM_ROUTED_PID
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user