Skip to content

Commit

Permalink
goes from ~210 to ~240 mean ms real time
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Jul 31, 2024
1 parent b494b14 commit 177ebaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion selfdrive/debug/check_can_parser_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 177ebaa

Please sign in to comment.