Robert Chacón 2023-02-06 18:45:08 -07:00 committed by GitHub
parent ab1de300b1
commit 8b33dd7be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -533,6 +533,7 @@ def refreshLatencyGraphs():
for circuit in subscriberCircuits: for circuit in subscriberCircuits:
if circuit['stats']['sinceLastQuery']['tcpLatency'] != None: if circuit['stats']['sinceLastQuery']['tcpLatency'] != None:
listOfAllLatencies.append(circuit['stats']['sinceLastQuery']['tcpLatency']) listOfAllLatencies.append(circuit['stats']['sinceLastQuery']['tcpLatency'])
if len(listOfAllLatencies) > 0:
currentNetworkLatency = statistics.median(listOfAllLatencies) currentNetworkLatency = statistics.median(listOfAllLatencies)
p = Point('TCP Latency').tag("Type", "Network").field("TCP Latency", currentNetworkLatency).time(timestamp) p = Point('TCP Latency').tag("Type", "Network").field("TCP Latency", currentNetworkLatency).time(timestamp)
write_api.write(bucket=influxDBBucket, record=p) write_api.write(bucket=influxDBBucket, record=p)