mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
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:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user