From 394c676ba2c8217f42e35d48b86cf5813dacf029 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 1 Feb 2019 19:17:49 +0200 Subject: [PATCH] Moved successfullyDecryptMessageTimings to class_objectProcessor --- src/class_objectProcessor.py | 7 ++++--- src/shared.py | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/class_objectProcessor.py b/src/class_objectProcessor.py index edfcec05..87b8eb21 100644 --- a/src/class_objectProcessor.py +++ b/src/class_objectProcessor.py @@ -49,6 +49,7 @@ class objectProcessor(threading.Thread): 'Loaded %s objects from disk into the objectProcessorQueue.', len(queryreturn)) self._ack_obj = bmproto.BMStringParser() + self.successfullyDecryptMessageTimings = [] def run(self): while True: @@ -748,17 +749,17 @@ class objectProcessor(threading.Thread): # Display timing data timeRequiredToAttemptToDecryptMessage = time.time( ) - messageProcessingStartTime - shared.successfullyDecryptMessageTimings.append( + self.successfullyDecryptMessageTimings.append( timeRequiredToAttemptToDecryptMessage) timing_sum = 0 - for item in shared.successfullyDecryptMessageTimings: + for item in self.successfullyDecryptMessageTimings: timing_sum += item logger.debug( 'Time to decrypt this message successfully: %s' '\nAverage time for all message decryption successes since' ' startup: %s.', timeRequiredToAttemptToDecryptMessage, - timing_sum / len(shared.successfullyDecryptMessageTimings) + timing_sum / len(self.successfullyDecryptMessageTimings) ) def processbroadcast(self, data): diff --git a/src/shared.py b/src/shared.py index e2239a3a..4f52e752 100644 --- a/src/shared.py +++ b/src/shared.py @@ -48,7 +48,6 @@ statusIconColor = 'red' thisapp = None # singleton lock instance -successfullyDecryptMessageTimings = [] ackdataForWhichImWatching = {} # used by API command clientStatus clientHasReceivedIncomingConnections = False