From b494b1442e51db25c7e8b6deffcae1149b3ea67b Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 30 Jul 2024 15:52:53 -0700 Subject: [PATCH] the interface now has to convert from can capnp to list, so we should include this time --- selfdrive/debug/check_can_parser_performance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/debug/check_can_parser_performance.py b/selfdrive/debug/check_can_parser_performance.py index 8b9ef068ac0705..07e9c55281a04d 100755 --- a/selfdrive/debug/check_can_parser_performance.py +++ b/selfdrive/debug/check_can_parser_performance.py @@ -26,12 +26,12 @@ class CarModelTestCase(TestCarModelBase): CC = car.CarControl.new_message() ets = [] for _ in tqdm(range(N_RUNS)): - msgs = can_capnp_to_list([m.as_builder().to_bytes() for m in tm.can_msgs]) + msgs = [m.as_builder().to_bytes() for m in tm.can_msgs] start_t = time.process_time_ns() for msg in msgs: for cp in tm.CI.can_parsers: if cp is not None: - cp.update_strings(msg) + cp.update_strings(can_capnp_to_list([msg])) ets.append((time.process_time_ns() - start_t) * 1e-6) print(f'{len(tm.can_msgs)} CAN packets, {N_RUNS} runs')