mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 00:43:54 +08:00
This reverts commit f2f01e3afaeaa267af61c8d7ab918da04d3411f2.
old-commit-hash: 7c112341c3
This commit is contained in:
@@ -6,6 +6,7 @@ from tqdm import tqdm
|
||||
from cereal import car
|
||||
from openpilot.selfdrive.car.tests.routes import CarTestRoute
|
||||
from openpilot.selfdrive.car.tests.test_models import TestCarModelBase
|
||||
from openpilot.selfdrive.pandad import can_capnp_to_list
|
||||
from openpilot.tools.plotjuggler.juggle import DEMO_ROUTE
|
||||
|
||||
N_RUNS = 10
|
||||
@@ -25,12 +26,13 @@ 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]
|
||||
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(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')
|
||||
|
||||
Reference in New Issue
Block a user