Skip to content

Commit

Permalink
the interface now has to convert from can capnp to list, so we should…
Browse files Browse the repository at this point in the history
… include this time
  • Loading branch information
sshane committed Jul 30, 2024
1 parent 705be09 commit b494b14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/debug/check_can_parser_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit b494b14

Please sign in to comment.