fixup timing script

old-commit-hash: 69160375c6
commatwo_master
Adeeb Shihadeh 4 years ago
parent 2445ace577
commit 65dc6c3209
  1. 4
      selfdrive/debug/check_timings.py

@ -17,8 +17,8 @@ if __name__ == "__main__":
msgs = messaging.drain_sock(sock) msgs = messaging.drain_sock(sock)
for m in msgs: for m in msgs:
ts[s].append(m.logMonoTime / 1e6) ts[s].append(m.logMonoTime / 1e6)
time.sleep(1)
if len(ts[s]) == ts[s].maxlen: if len(ts[s]) == ts[s].maxlen:
d = np.diff(ts[s]) d = np.diff(ts[s])
print(f"{s:17} {np.max(d):.2f} {np.max(d):.2f} {np.max(d):.2f} {np.std(d):.2f}") print(f"{s:17} {np.mean(d):.2f} {np.std(d):.2f} {np.max(d):.2f} {np.min(d):.2f}")
time.sleep(1)

Loading…
Cancel
Save