From 80fda92231a63607e4e63bb66699c26ce23c5afb Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Mon, 11 May 2026 09:55:11 +0700 Subject: [PATCH] fix(irtt-stats): use event timestamp for warnings instead of current time Ensure warning statistics reflect the actual time the event occurred rather than the moment the event was processed. --- crates/irtt-stats/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/irtt-stats/src/lib.rs b/crates/irtt-stats/src/lib.rs index 971a240..0192fcd 100644 --- a/crates/irtt-stats/src/lib.rs +++ b/crates/irtt-stats/src/lib.rs @@ -619,7 +619,7 @@ impl WindowEvent { at: received_at.mono, }), ClientEvent::EchoLoss { timeout_at, .. } => Some(Self::Loss { at: *timeout_at }), - ClientEvent::Warning { .. } => Some(Self::Warning { at: Instant::now() }), + ClientEvent::Warning { at, .. } => Some(Self::Warning { at: at.mono }), ClientEvent::SessionStarted { .. } | ClientEvent::NoTestCompleted { .. } | ClientEvent::SessionClosed { .. } => None,