From 724fbc183e783bcc6ba219789d49f43164f29256 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 11 Nov 2021 13:07:54 -0800 Subject: [PATCH] timing formatting --- selfdrive/test/test_onroad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/test/test_onroad.py b/selfdrive/test/test_onroad.py index c117a3d986c087..86d9a9937991ca 100755 --- a/selfdrive/test/test_onroad.py +++ b/selfdrive/test/test_onroad.py @@ -241,8 +241,8 @@ def test_timings(self): result += f"{s} - failed RSD timing check\n" passed = False - result += f"{s}: {np.array([np.mean(ts), np.max(ts), np.min(ts)])*1e3}\n" - result += f" {np.max(np.absolute([np.max(ts)/dt, np.min(ts)/dt]))} {np.std(ts)/dt}\n" + result += f"{s.ljust(40)}: {np.array([np.mean(ts), np.max(ts), np.min(ts)])*1e3}\n" + result += f"{''.ljust(40)} {np.max(np.absolute([np.max(ts)/dt, np.min(ts)/dt]))} {np.std(ts)/dt}\n" result += "="*67 print(result) self.assertTrue(passed)