diff --git a/benchmark3.py b/benchmark3.py index 4ce74a5..648c1a1 100644 --- a/benchmark3.py +++ b/benchmark3.py @@ -266,11 +266,18 @@ def main(): except queue.Empty: break - try: - benchmark_results[returned_job.id].alert_arrived = returned_job.arrived - except KeyError: + # super ghetto pairing + paired = False + for benchmark_result in benchmark_results: + if benchmark_result.id == returned_job.id: + benchmark_result.alert_arrived = returned_job.arrived + paired = True + break + + if not paired: print("Bruh moment: Alert arrived with an id that's not sent", returned_job.id) + total_answered += 1 # print some mini statistics