From ee8679a73170da73a988d99295eb1e162f6b81e6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Nov 2019 22:28:40 +0000 Subject: [PATCH] Report how long inbox cleadown took --- daemon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon.py b/daemon.py index 31835fad..3c1bb978 100644 --- a/daemon.py +++ b/daemon.py @@ -732,11 +732,14 @@ class PubServer(BaseHTTPRequestHandler): """ if len(self.server.inboxQueue)>=self.server.maxQueueLength: print('Inbox queue is full. Removing oldest items.') + cleardownStartTime=time.time() while len(self.server.inboxQueue) >= self.server.maxQueueLength-4: queueFilename=self.server.inboxQueue[0] if os.path.isfile(queueFilename): os.remove(queueFilename) self.server.inboxQueue.pop(0) + timeDiff=str(int((time.time()-cleardownStartTime)*1000)) + print('Inbox cleardown took '+timeDiff+' mS') def _updateInboxQueue(self,nickname: str,messageJson: {}, \ messageBytes: str) -> int: