From 7654534777abb280e5e1150481489d66a3f61e03 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 16 Nov 2019 10:07:32 +0000 Subject: [PATCH] Log digest calculation time --- inbox.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/inbox.py b/inbox.py index 4befca4d..e0ce193d 100644 --- a/inbox.py +++ b/inbox.py @@ -299,7 +299,13 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \ if nickname=='inbox': nickname=originalDomain sharedInboxItem=True - + + digestStartTime=time.time() + digest=messageContentDigest(messageBytes) + timeDiff=int((time.time()-digestStartTime)*1000) + if debug or timeDiff>200: + print('DIGEST|'+str(timeDiff)+'|'+filename) + newQueueItem = { 'originalId': originalPostId, 'id': postId, @@ -313,7 +319,7 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \ 'httpHeaders': httpHeaders, 'path': postPath, 'post': postJsonObject, - 'digest': messageContentDigest(messageBytes), + 'digest': digest, 'filename': filename, 'destination': destination }