mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-06 10:20:16 +03:00
Increase telemetry queue size (#3802)
It seems like we've fixed the clickhouse errors by switching to `async_insert`, but we're still seeing a hiccup here and there on vercel's socket. I slowed down the collection of cpu and memory events earlier, and this PR will slow down how frequently we send events in general, by increasing the queue size and the debounce time. Release Notes: - N/A
This commit is contained in:
commit
72b3a1dd9a
@ -119,13 +119,13 @@ 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);
|
||||
|
||||
#[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<dyn HttpClient>, cx: &AppContext) -> Arc<Self> {
|
||||
|
@ -118,13 +118,13 @@ 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);
|
||||
|
||||
#[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<dyn HttpClient>, cx: &mut AppContext) -> Arc<Self> {
|
||||
|
Loading…
Reference in New Issue
Block a user