mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Merge branch 'main' of https://github.com/LibreQoE/LibreQoS
This commit is contained in:
@@ -306,16 +306,18 @@ def getParentNodeLatencyStats(parentNodes, subscriberCircuits):
|
||||
|
||||
|
||||
def getCircuitLatencyStats(subscriberCircuits):
|
||||
command = './src/bin/xdp_pping'
|
||||
listOfEntries = json.loads(subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8'))
|
||||
command = './bin/xdp_pping'
|
||||
consoleOutput = subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||
consoleOutput = consoleOutput.replace('\n','').replace('}{', '}, {')
|
||||
listOfEntries = json.loads(consoleOutput)
|
||||
|
||||
tcpLatencyForClassID = {}
|
||||
for entry in listOfEntries:
|
||||
if 'tc' in entry:
|
||||
handle = hex(int(entry['tc'].split(':')[0])) + ':' + hex(int(entry['tc'].split(':')[1]))
|
||||
handle = '0x' + entry['tc'].split(':')[0] + ':' + '0x' + entry['tc'].split(':')[1]
|
||||
# To avoid outliers messing up avg for each circuit - cap at ceiling of 200ms
|
||||
ceiling = 200.0
|
||||
tcpLatencyForClassID[handle] = min(entry['avg'], ceiling)
|
||||
tcpLatencyForClassID[handle] = min(entry['median'], ceiling)
|
||||
|
||||
for circuit in subscriberCircuits:
|
||||
if 'stats' not in circuit:
|
||||
|
||||
@@ -128,7 +128,7 @@ fn draw_top_pane<'a>(
|
||||
scale_packets(stats.packets_per_second.1)
|
||||
)),
|
||||
Cell::from(format!(
|
||||
"{:>7} ms",
|
||||
"{:>10} ms",
|
||||
format!("{:.2}", stats.median_tcp_rtt)
|
||||
)),
|
||||
Cell::from(format!("{:>7}", stats.tc_handle.to_string())),
|
||||
@@ -154,12 +154,12 @@ fn draw_top_pane<'a>(
|
||||
Block::default().title(draw_pps(packets_per_second, bits_per_second)),
|
||||
)
|
||||
.widths(&[
|
||||
Constraint::Min(40),
|
||||
Constraint::Min(42),
|
||||
Constraint::Length(15),
|
||||
Constraint::Length(15),
|
||||
Constraint::Length(15),
|
||||
Constraint::Length(15),
|
||||
Constraint::Length(15),
|
||||
Constraint::Length(11),
|
||||
Constraint::Length(7),
|
||||
])
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ def graph():
|
||||
refreshBandwidthGraphs()
|
||||
except:
|
||||
print("Failed to run refreshBandwidthGraphs()")
|
||||
#time.sleep(1)
|
||||
#try:
|
||||
# refreshLatencyGraphs()
|
||||
#except:
|
||||
# print("Failed to run refreshLatencyGraphs()")
|
||||
time.sleep(1)
|
||||
try:
|
||||
refreshLatencyGraphs()
|
||||
except:
|
||||
print("Failed to run refreshLatencyGraphs()")
|
||||
|
||||
if __name__ == '__main__':
|
||||
importAndShapeFullReload()
|
||||
|
||||
Reference in New Issue
Block a user