diff --git a/selfdrive/debug/check_can_parser_performance.py b/selfdrive/debug/check_can_parser_performance.py index c4b688ce29..604a1df124 100755 --- a/selfdrive/debug/check_can_parser_performance.py +++ b/selfdrive/debug/check_can_parser_performance.py @@ -25,11 +25,12 @@ if __name__ == '__main__': CC = car.CarControl.new_message() ets = [] for _ in tqdm(range(N_RUNS)): + msgs = [(m.as_builder().to_bytes(),) for m in tm.can_msgs] start_t = time.process_time_ns() - for msg in tm.can_msgs: + for msg in msgs: for cp in tm.CI.can_parsers: if cp is not None: - cp.update_strings((msg.as_builder().to_bytes(),)) + cp.update_strings(msg) ets.append((time.process_time_ns() - start_t) * 1e-6) print(f'{len(tm.can_msgs)} CAN packets, {N_RUNS} runs')