Apply ceiling to TCP Latency tracked by circuit, to avoid outliers messing up stats

This commit is contained in:
Robert Chacón 2022-11-01 04:43:52 -06:00 committed by GitHub
parent d4d223f098
commit 696018feba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,9 @@ def getCircuitLatencyStats(subscriberCircuits):
for entry in listOfEntries:
if 'tc' in entry:
handle = hex(int(entry['tc'].split(':')[0])) + ':' + hex(int(entry['tc'].split(':')[1]))
tcpLatencyForClassID[handle] = entry['avg']
# To avoid outliers messing up avg for each circuit - cap at ceiling of 200ms
ceiling = 200.0
tcpLatencyForClassID[handle] = min(entry['avg'], ceiling)
for circuit in subscriberCircuits:
if 'stats' not in circuit: