From aa0eaea4e9db0a8b543897a3d0f99fd901cbc0b3 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Jan 2025 15:42:19 +0100 Subject: [PATCH] Double max event count for zeta (#22772) Release Notes: - N/A Co-authored-by: Thorsten --- crates/zeta/src/zeta.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index d227c0bcab..13c2d37171 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -205,6 +205,8 @@ impl Zeta { } fn push_event(&mut self, event: Event) { + const MAX_EVENT_COUNT: usize = 20; + if let Some(Event::BufferChange { new_snapshot: last_new_snapshot, timestamp: last_timestamp, @@ -229,7 +231,7 @@ impl Zeta { } self.events.push_back(event); - if self.events.len() > 10 { + if self.events.len() > MAX_EVENT_COUNT { self.events.pop_front(); } }