rate
Simon 4 years ago
parent f06a49a14c
commit 3c1bc860a9

@ -1521,6 +1521,7 @@ class routerOBP(OPENBRIDGE):
if 'LOOPLOG' not in self.STATUS[_stream_id] or not self.STATUS[_stream_id]['LOOPLOG']: if 'LOOPLOG' not in self.STATUS[_stream_id] or not self.STATUS[_stream_id]['LOOPLOG']:
call_duration = pkt_time - self.STATUS[_stream_id]['START'] call_duration = pkt_time - self.STATUS[_stream_id]['START']
packet_rate = 0 packet_rate = 0
if 'packets' in self.STATUS[_stream_id]:
packet_rate = self.STATUS[_stream_id]['packets'] / call_duration packet_rate = self.STATUS[_stream_id]['packets'] / call_duration
logger.warning("(%s) OBP UNIT *LoopControl* FIRST OBP %s, STREAM ID: %s, TG %s, IGNORE THIS SOURCE. PACKET RATE %0.2f/s",self._system, fi, int_id(_stream_id), int_id(_dst_id),packet_rate) logger.warning("(%s) OBP UNIT *LoopControl* FIRST OBP %s, STREAM ID: %s, TG %s, IGNORE THIS SOURCE. PACKET RATE %0.2f/s",self._system, fi, int_id(_stream_id), int_id(_dst_id),packet_rate)
self.STATUS[_stream_id]['LOOPLOG'] = True self.STATUS[_stream_id]['LOOPLOG'] = True
@ -1680,6 +1681,7 @@ class routerOBP(OPENBRIDGE):
if 'LOOPLOG' not in self.STATUS[_stream_id] or not self.STATUS[_stream_id]['LOOPLOG']: if 'LOOPLOG' not in self.STATUS[_stream_id] or not self.STATUS[_stream_id]['LOOPLOG']:
call_duration = pkt_time - self.STATUS[_stream_id]['START'] call_duration = pkt_time - self.STATUS[_stream_id]['START']
packet_rate = 0 packet_rate = 0
if 'packets' in self.STATUS[_stream_id]:
packet_rate = self.STATUS[_stream_id]['packets'] / call_duration packet_rate = self.STATUS[_stream_id]['packets'] / call_duration
logger.warning("(%s) OBP *LoopControl* FIRST OBP %s, STREAM ID: %s, TG %s, IGNORE THIS SOURCE. PACKET RATE %0.2f/s",self._system, fi, int_id(_stream_id), int_id(_dst_id),call_duration) logger.warning("(%s) OBP *LoopControl* FIRST OBP %s, STREAM ID: %s, TG %s, IGNORE THIS SOURCE. PACKET RATE %0.2f/s",self._system, fi, int_id(_stream_id), int_id(_dst_id),call_duration)
self.STATUS[_stream_id]['LOOPLOG'] = True self.STATUS[_stream_id]['LOOPLOG'] = True

Loading…
Cancel
Save

Powered by TurnKey Linux.