From 29789acfd9a2502db5f3190fd24c8432a465c190 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Thu, 28 May 2015 09:58:06 -0500 Subject: [PATCH] Internal Diagnostics (Timing) Added some stuff for measuring timing. Must be uncommented to work. --- dmrlink.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dmrlink.py b/dmrlink.py index ca6e8ac..b3d4b9a 100755 --- a/dmrlink.py +++ b/dmrlink.py @@ -1101,8 +1101,8 @@ class IPSC(DatagramProtocol): def datagramReceived(self, data, (host, port)): # Loop timing test, uncomment the next two lines. Use for testing only. - _pkt_id = randint(0,10000) - _pkt_time = time.time() + #_pkt_id = randint(0,10000) + #_pkt_time = time.time() _packettype = data[0:1] _peerid = data[1:5] @@ -1155,7 +1155,7 @@ class IPSC(DatagramProtocol): # Loop timing test, uncomment the next two lines. Use for testing only. #_pkt_proc_time = (time.time() - _pkt_time) * 1000 - #print('TIMING: Group voice packet ID {} took {} ms'.format(_pkt_id, _pkt_proc_time)) + #logger.info('TIMING: Group voice packet ID %s took %s ms', _pkt_id, _pkt_proc_time) return