tici: give loggerd rt priority (#21503)

* give loggerd rt priority

* assert

* little more

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 7e2752c878a9e8c38639e4caa234bcabb979db2e
This commit is contained in:
Adeeb Shihadeh
2021-08-20 21:27:31 -07:00
committed by GitHub
parent fe6ef87073
commit 5c1d1ebe76
5 changed files with 22 additions and 17 deletions
+3 -4
View File
@@ -12,13 +12,12 @@ ts = defaultdict(lambda: deque(maxlen=100))
if __name__ == "__main__":
while True:
time.sleep(1)
print()
for s, sock in socks.items():
msgs = messaging.drain_sock(sock)
for m in msgs:
ts[s].append(m.logMonoTime / 1e6)
if len(ts[s]) == ts[s].maxlen:
d = np.diff(ts[s])
print(f"{s:17} {np.mean(d):.2f} {np.std(d):.2f} {np.max(d):.2f} {np.min(d):.2f}")
time.sleep(1)
d = np.diff(ts[s])
print(f"{s:17} {np.mean(d):.2f} {np.std(d):.2f} {np.max(d):.2f} {np.min(d):.2f}")