Moved successfullyDecryptMessageTimings to class_objectProcessor

This commit is contained in:
Dmitri Bogomolov 2019-02-01 19:17:49 +02:00
parent c2a3b5faed
commit 394c676ba2
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 4 additions and 4 deletions

View File

@ -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):

View File

@ -48,7 +48,6 @@ statusIconColor = 'red'
thisapp = None # singleton lock instance
successfullyDecryptMessageTimings = []
ackdataForWhichImWatching = {}
# used by API command clientStatus
clientHasReceivedIncomingConnections = False