mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-21 05:52:06 +08:00
sanity check on debayer time in CI (#24453)
* check debayer time * set actual threshold * also print mean and max
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user