From 6cad30328540737be6551c5410e86df90f682076 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Thu, 8 Feb 2024 08:07:16 +0100 Subject: [PATCH] Debug prints :-) --- fosdem_video_progress.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fosdem_video_progress.py b/fosdem_video_progress.py index 9a6dcd4..63ad3b8 100755 --- a/fosdem_video_progress.py +++ b/fosdem_video_progress.py @@ -43,6 +43,7 @@ def main(): while True: time, states, jobstates = get_data() + print(f'data got at {time}') assert time not in ts.data ts.data[time] = (states, jobstates) ts.states |= states.keys() @@ -52,6 +53,7 @@ def main(): # Should probably save elsewhere and do atomic rename, but whatever. with open(pickle_file, 'wb') as f: pickle.dump(ts, f) + print('pickle saved') # Show the plot x = sorted(ts.data.keys()) # times @@ -60,6 +62,7 @@ def main(): # ys are transposed – we need vectors by times, not by states. ys = list(zip(*ys)) plt.stackplot(x, *ys) + print('showing plot') plt.show(block=False) plt.pause(poll_rate)