From 0746a10d9be20be72dc368b5112799e17347e83a Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Fri, 22 Dec 2023 19:56:06 -0500 Subject: [PATCH 1/2] Increase telemetry queue size --- crates/client/src/telemetry.rs | 2 +- crates/client2/src/telemetry.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index 6d70de6138..5e97382d70 100644 --- a/crates/client/src/telemetry.rs +++ b/crates/client/src/telemetry.rs @@ -119,7 +119,7 @@ pub enum ClickhouseEvent { const MAX_QUEUE_LEN: usize = 1; #[cfg(not(debug_assertions))] -const MAX_QUEUE_LEN: usize = 10; +const MAX_QUEUE_LEN: usize = 50; #[cfg(debug_assertions)] const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(1); diff --git a/crates/client2/src/telemetry.rs b/crates/client2/src/telemetry.rs index 71c4c33491..e1a7d3f41e 100644 --- a/crates/client2/src/telemetry.rs +++ b/crates/client2/src/telemetry.rs @@ -118,7 +118,7 @@ pub enum ClickhouseEvent { const MAX_QUEUE_LEN: usize = 1; #[cfg(not(debug_assertions))] -const MAX_QUEUE_LEN: usize = 10; +const MAX_QUEUE_LEN: usize = 50; #[cfg(debug_assertions)] const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(1); From 1989094e6dc064d19ad83b1b5f07af14c6876915 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Fri, 22 Dec 2023 19:57:13 -0500 Subject: [PATCH 2/2] Increase queue flush debounce time --- crates/client/src/telemetry.rs | 2 +- crates/client2/src/telemetry.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index 5e97382d70..0118832fe0 100644 --- a/crates/client/src/telemetry.rs +++ b/crates/client/src/telemetry.rs @@ -125,7 +125,7 @@ const MAX_QUEUE_LEN: usize = 50; const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(1); #[cfg(not(debug_assertions))] -const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(30); +const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(120); impl Telemetry { pub fn new(client: Arc, cx: &AppContext) -> Arc { diff --git a/crates/client2/src/telemetry.rs b/crates/client2/src/telemetry.rs index e1a7d3f41e..e27bc3a498 100644 --- a/crates/client2/src/telemetry.rs +++ b/crates/client2/src/telemetry.rs @@ -124,7 +124,7 @@ const MAX_QUEUE_LEN: usize = 50; const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(1); #[cfg(not(debug_assertions))] -const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(30); +const DEBOUNCE_INTERVAL: Duration = Duration::from_secs(120); impl Telemetry { pub fn new(client: Arc, cx: &mut AppContext) -> Arc {