mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
37c1153c1e
fix(ecstore): age LastMinuteLatency samples individually (backlog#806-16) The rolling one-minute latency window stored bare Duration samples plus a single, never-updated start_time. Its retain predicate ignored the element and evaluated the constant now.duration_since(start_time) < 60s, so once the window had existed for 60s every add() dropped ALL samples and the average degenerated to the latest single sample. Each sample now carries its own Instant and is retained by its individual age. The type backs only in-memory EpHealth + admin display (the wire shape is target::LatencyStat with curr/avg/max), so Serialize/Deserialize is kept only to satisfy the enclosing LatencyStat derive; the sample Instant is serde(skip) and restarts aging on reload.