From 610a3429dd9b58549cb70c78ac00ee229b2a3cf6 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Wed, 14 Apr 2021 17:03:25 +0200 Subject: [PATCH] Debug: Add accumulated data count --- fstream-server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fstream-server.py b/fstream-server.py index 2af4f7c..8f23c32 100644 --- a/fstream-server.py +++ b/fstream-server.py @@ -202,9 +202,14 @@ class debugThread(threading.Thread): def run(self): while True: with threadsLock: + print("---") print("Threads - IN: " +str(len(inThreads))) print("Threads - OUT: " +str(len(outThreads))) - time.sleep(10) + print("ACCUMULATED DATA:") + for threadId in outThreads: + thread = outThreads[threadId] + print(threadId + ": " + str(thread.queue.qsize() * bufferSize)) + time.sleep(1) def main(): global threadId