fix(stats): expire backdated events from rolling time windows

This commit is contained in:
Nils Andreas Svee committed 2026-10-03 22:29:42 +07:00
1 parent 48a50d7f3a
commit edff75e55a
5 files changed
+90 -23

No files matched your search

+3 -1
View File
@@ -58,7 +58,9 @@ pub struct StatsConfig {
///
/// This window has no item cap, even in continuous mode. Its memory depends
/// on event volume inside the interval. Expiry occurs on insertion, anchored
/// at the latest event timestamp, not when a snapshot is read.
/// at the maximum observed normalized event timestamp, not when a snapshot
/// is read. Events exactly at the cutoff are included. Backdated events
/// cannot move the anchor backwards or restore expired history.
pub rolling_time: Option<Duration>,
/// Whether matched late replies contribute measurements.
pub late_replies: LateReplyMode,