From 177ebaa7c193b5b4d60a21ee664e8edd5182e409 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 30 Jul 2024 21:33:00 -0700 Subject: [PATCH] goes from ~210 to ~240 mean ms real time --- selfdrive/debug/check_can_parser_performance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/debug/check_can_parser_performance.py b/selfdrive/debug/check_can_parser_performance.py index 07e9c55281a04d..a5155f0126b8dc 100755 --- a/selfdrive/debug/check_can_parser_performance.py +++ b/selfdrive/debug/check_can_parser_performance.py @@ -29,9 +29,10 @@ class CarModelTestCase(TestCarModelBase): msgs = [m.as_builder().to_bytes() for m in tm.can_msgs] start_t = time.process_time_ns() for msg in msgs: + can_list = can_capnp_to_list([msg]) for cp in tm.CI.can_parsers: if cp is not None: - cp.update_strings(can_capnp_to_list([msg])) + cp.update_strings(can_list) ets.append((time.process_time_ns() - start_t) * 1e-6) print(f'{len(tm.can_msgs)} CAN packets, {N_RUNS} runs')