Moved successfullyDecryptMessageTimings to class_objectProcessor
This commit is contained in:
parent
c2a3b5faed
commit
394c676ba2
|
@ -49,6 +49,7 @@ class objectProcessor(threading.Thread):
|
||||||
'Loaded %s objects from disk into the objectProcessorQueue.',
|
'Loaded %s objects from disk into the objectProcessorQueue.',
|
||||||
len(queryreturn))
|
len(queryreturn))
|
||||||
self._ack_obj = bmproto.BMStringParser()
|
self._ack_obj = bmproto.BMStringParser()
|
||||||
|
self.successfullyDecryptMessageTimings = []
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while True:
|
while True:
|
||||||
|
@ -748,17 +749,17 @@ class objectProcessor(threading.Thread):
|
||||||
# Display timing data
|
# Display timing data
|
||||||
timeRequiredToAttemptToDecryptMessage = time.time(
|
timeRequiredToAttemptToDecryptMessage = time.time(
|
||||||
) - messageProcessingStartTime
|
) - messageProcessingStartTime
|
||||||
shared.successfullyDecryptMessageTimings.append(
|
self.successfullyDecryptMessageTimings.append(
|
||||||
timeRequiredToAttemptToDecryptMessage)
|
timeRequiredToAttemptToDecryptMessage)
|
||||||
timing_sum = 0
|
timing_sum = 0
|
||||||
for item in shared.successfullyDecryptMessageTimings:
|
for item in self.successfullyDecryptMessageTimings:
|
||||||
timing_sum += item
|
timing_sum += item
|
||||||
logger.debug(
|
logger.debug(
|
||||||
'Time to decrypt this message successfully: %s'
|
'Time to decrypt this message successfully: %s'
|
||||||
'\nAverage time for all message decryption successes since'
|
'\nAverage time for all message decryption successes since'
|
||||||
' startup: %s.',
|
' startup: %s.',
|
||||||
timeRequiredToAttemptToDecryptMessage,
|
timeRequiredToAttemptToDecryptMessage,
|
||||||
timing_sum / len(shared.successfullyDecryptMessageTimings)
|
timing_sum / len(self.successfullyDecryptMessageTimings)
|
||||||
)
|
)
|
||||||
|
|
||||||
def processbroadcast(self, data):
|
def processbroadcast(self, data):
|
||||||
|
|
|
@ -48,7 +48,6 @@ statusIconColor = 'red'
|
||||||
|
|
||||||
thisapp = None # singleton lock instance
|
thisapp = None # singleton lock instance
|
||||||
|
|
||||||
successfullyDecryptMessageTimings = []
|
|
||||||
ackdataForWhichImWatching = {}
|
ackdataForWhichImWatching = {}
|
||||||
# used by API command clientStatus
|
# used by API command clientStatus
|
||||||
clientHasReceivedIncomingConnections = False
|
clientHasReceivedIncomingConnections = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user