mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Use base delay (which is sparse delay) rather than average delay, and use log y values on the delays chart.
This commit is contained in:
parent
0dc7ef4201
commit
73427519c8
@ -30,7 +30,7 @@ pub struct CakeDiffTinTransit {
|
||||
pub backlog_bytes: u32,
|
||||
pub drops: u32,
|
||||
pub marks: u32,
|
||||
pub avg_delay_us: u32,
|
||||
pub base_delay_us: u32,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
|
||||
|
@ -304,8 +304,21 @@
|
||||
}
|
||||
|
||||
ingestDelays(subData, currentX, tin) {
|
||||
this.delays.store(tin, currentX, 0, subData[0][CDT.tins][tin][CDTT.avg_delay_us] * 0.001);
|
||||
this.delays.store(tin, currentX, 1, 0.0 - subData[1][CDT.tins][tin][CDTT.avg_delay_us] * 0.001);
|
||||
let down = subData[0][CDT.tins][tin][CDTT.avg_delay_us] * 0.001;
|
||||
let up = subData[1][CDT.tins][tin][CDTT.avg_delay_us] * 0.001;
|
||||
if (down == 0.0) {
|
||||
down = null;
|
||||
} else {
|
||||
down = Math.log10(down);
|
||||
}
|
||||
if (up == 0.0) {
|
||||
up = null;
|
||||
} else {
|
||||
//console.log(up);
|
||||
up = 0.0 - Math.log10(up);
|
||||
}
|
||||
this.delays.store(tin, currentX, 0, down);
|
||||
this.delays.store(tin, currentX, 1, up);
|
||||
}
|
||||
|
||||
ingestQueueLen(subData, currentX) {
|
||||
@ -374,7 +387,13 @@
|
||||
|
||||
if (this.backlogPlotted == null) {
|
||||
this.backlogPlotted = true;
|
||||
Plotly.newPlot(graph, graphData, { margin: { l: 0, r: 0, b: 0, t: 0, pad: 4 }, yaxis: { automargin: true, title: "Packets" }, xaxis: { automargin: true, title: "Time since now" } });
|
||||
Plotly.newPlot(
|
||||
graph,
|
||||
graphData,
|
||||
{
|
||||
margin: { l: 0, r: 0, b: 0, t: 0, pad: 4 },
|
||||
yaxis: { automargin: true, title: "Packets" },
|
||||
xaxis: { automargin: true, title: "Time since now" } });
|
||||
} else {
|
||||
Plotly.redraw(graph, graphData);
|
||||
}
|
||||
@ -390,7 +409,12 @@
|
||||
];
|
||||
|
||||
if (this.delaysPlotted == null) {
|
||||
Plotly.newPlot(graph, graphData, { margin: { l: 0, r: 0, b: 0, t: 0, pad: 4 }, yaxis: { automargin: true, title: "ms" }, xaxis: { automargin: true, title: "Time since now" } });
|
||||
Plotly.newPlot(
|
||||
graph,
|
||||
graphData,
|
||||
{ margin: { l: 8, r: 0, b: 0, t: 0, pad: 4 },
|
||||
yaxis: { automargin: true, title: "log10(ms)", range: [-1.0, 1.0] },
|
||||
xaxis: { automargin: true, title: "Time since now" } });
|
||||
this.delaysPlotted = true;
|
||||
} else {
|
||||
Plotly.redraw(graph, graphData);
|
||||
|
@ -46,7 +46,7 @@ pub struct CakeDiffTin {
|
||||
pub backlog_bytes: u32,
|
||||
pub drops: u32,
|
||||
pub marks: u32,
|
||||
pub avg_delay_us: u32,
|
||||
pub base_delay_us: u32,
|
||||
}
|
||||
|
||||
fn cake_diff(
|
||||
@ -65,7 +65,7 @@ fn cake_diff(
|
||||
backlog_bytes: new.backlog_bytes,
|
||||
drops: new.drops.saturating_sub(prev.drops),
|
||||
marks: new.ecn_marks.saturating_sub(prev.ecn_marks),
|
||||
avg_delay_us: new.avg_delay_us,
|
||||
base_delay_us: new.base_delay_us,
|
||||
})
|
||||
.collect();
|
||||
return Ok(QueueDiff::Cake(CakeDiff {
|
||||
|
@ -101,7 +101,7 @@ impl Into<CakeDiffTinTransit> for CakeDiffTin {
|
||||
backlog_bytes: self.backlog_bytes,
|
||||
drops: self.drops,
|
||||
marks: self.marks,
|
||||
avg_delay_us: self.avg_delay_us,
|
||||
base_delay_us: self.base_delay_us,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user