diff --git a/src/rust/lqos_bus/src/bus/queue_data.rs b/src/rust/lqos_bus/src/bus/queue_data.rs index 42b74680..3ea63146 100644 --- a/src/rust/lqos_bus/src/bus/queue_data.rs +++ b/src/rust/lqos_bus/src/bus/queue_data.rs @@ -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)] diff --git a/src/rust/lqos_node_manager/static/circuit_queue.html b/src/rust/lqos_node_manager/static/circuit_queue.html index 28d0bd4e..75cf9c12 100644 --- a/src/rust/lqos_node_manager/static/circuit_queue.html +++ b/src/rust/lqos_node_manager/static/circuit_queue.html @@ -305,8 +305,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) { @@ -375,7 +388,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); } @@ -391,7 +410,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); diff --git a/src/rust/lqos_queue_tracker/src/queue_diff.rs b/src/rust/lqos_queue_tracker/src/queue_diff.rs index 22c4d486..7becc43b 100644 --- a/src/rust/lqos_queue_tracker/src/queue_diff.rs +++ b/src/rust/lqos_queue_tracker/src/queue_diff.rs @@ -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 { diff --git a/src/rust/lqos_queue_tracker/src/queue_store.rs b/src/rust/lqos_queue_tracker/src/queue_store.rs index 55171057..2047825c 100644 --- a/src/rust/lqos_queue_tracker/src/queue_store.rs +++ b/src/rust/lqos_queue_tracker/src/queue_store.rs @@ -101,7 +101,7 @@ impl Into 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, } } }