sanity check on debayer time in CI (#24453)

* check debayer time

* set actual threshold

* also print mean and max
old-commit-hash: 9ef17a877f
taco
Willem Melching 3 years ago committed by GitHub
parent 1dab87e416
commit 7a855eff47
  1. 14
      selfdrive/test/test_onroad.py

@ -181,6 +181,20 @@ class TestOnroad(unittest.TestCase):
cpu_ok = check_cpu_usage(proclogs[0], proclogs[-1])
self.assertTrue(cpu_ok)
def test_camera_processing_time(self):
result = "\n"
result += "------------------------------------------------\n"
result += "-------------- Debayer Timing ------------------\n"
result += "------------------------------------------------\n"
ts = [getattr(getattr(m, m.which()), "processingTime") for m in self.lr if 'CameraState' in m.which()]
self.assertLess(min(ts), 0.025, f"high execution time: {min(ts)}")
result += f"execution time: min {min(ts):.5f}s\n"
result += f"execution time: max {max(ts):.5f}s\n"
result += f"execution time: mean {np.mean(ts):.5f}s\n"
result += "------------------------------------------------\n"
print(result)
def test_mpc_execution_timings(self):
result = "\n"
result += "------------------------------------------------\n"

Loading…
Cancel
Save