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.
This commit is contained in:
Nils Andreas Svee committed 2026-05-11 09:55:11 +07:00
1 parent 5f6bff5dcb
commit 80fda92231
1 file changed
+1 -1
+1 -1
View File
@@ -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,