From a501a2d2fac7fb5925499111e4d6040c68895de2 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 14 Nov 2023 13:50:11 -0800 Subject: [PATCH] MissedTickBehavior::Delay everywhere --- web3_proxy/src/stats/stat_buffer.rs | 4 ++-- web3_proxy_cli/src/sub_commands/sentryd/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web3_proxy/src/stats/stat_buffer.rs b/web3_proxy/src/stats/stat_buffer.rs index bb77bf6b..35ac090f 100644 --- a/web3_proxy/src/stats/stat_buffer.rs +++ b/web3_proxy/src/stats/stat_buffer.rs @@ -138,8 +138,8 @@ impl StatBuffer { interval(Duration::from_secs(self.db_save_interval_seconds as u64)); // todo: what behavior? - db_save_interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip); - tsdb_save_interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip); + db_save_interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Delay); + tsdb_save_interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Delay); // TODO: this should be a FlushedStats that we add to let mut total_requests = 0; diff --git a/web3_proxy_cli/src/sub_commands/sentryd/mod.rs b/web3_proxy_cli/src/sub_commands/sentryd/mod.rs index 61a1afe2..66fbf09e 100644 --- a/web3_proxy_cli/src/sub_commands/sentryd/mod.rs +++ b/web3_proxy_cli/src/sub_commands/sentryd/mod.rs @@ -276,7 +276,7 @@ where let mut interval = interval(Duration::from_secs(seconds)); // TODO: should we warn if there are delays? - interval.set_missed_tick_behavior(MissedTickBehavior::Skip); + interval.set_missed_tick_behavior(MissedTickBehavior::Delay); loop { interval.tick().await;