mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-21 15:57:24 -06:00
This commit is contained in:
parent
ab1de300b1
commit
8b33dd7be6
@ -533,10 +533,11 @@ 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'])
|
||||||
currentNetworkLatency = statistics.median(listOfAllLatencies)
|
if len(listOfAllLatencies) > 0:
|
||||||
p = Point('TCP Latency').tag("Type", "Network").field("TCP Latency", currentNetworkLatency).time(timestamp)
|
currentNetworkLatency = statistics.median(listOfAllLatencies)
|
||||||
write_api.write(bucket=influxDBBucket, record=p)
|
p = Point('TCP Latency').tag("Type", "Network").field("TCP Latency", currentNetworkLatency).time(timestamp)
|
||||||
queriesToSendCount += 1
|
write_api.write(bucket=influxDBBucket, record=p)
|
||||||
|
queriesToSendCount += 1
|
||||||
|
|
||||||
print("Added " + str(queriesToSendCount) + " points to InfluxDB.")
|
print("Added " + str(queriesToSendCount) + " points to InfluxDB.")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user