From 422da6e82d193340c40ad051ee460d7f72aeec6d Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 1 Sep 2022 21:18:30 +1000 Subject: [PATCH] Increase slow code log thresholds (#4997) --- zebra-chain/src/diagnostic.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zebra-chain/src/diagnostic.rs b/zebra-chain/src/diagnostic.rs index 1d662ec2c..e8edc8f3c 100644 --- a/zebra-chain/src/diagnostic.rs +++ b/zebra-chain/src/diagnostic.rs @@ -7,10 +7,14 @@ use std::time::{Duration, Instant}; use crate::fmt::duration_short; /// The default minimum info-level message time. -pub const DEFAULT_MIN_INFO_TIME: Duration = Duration::from_secs(5); +/// +/// This is high enough to ignore most slow code. +pub const DEFAULT_MIN_INFO_TIME: Duration = Duration::from_secs(5 * 60); /// The default minimum warning message time. -pub const DEFAULT_MIN_WARN_TIME: Duration = Duration::from_secs(20); +/// +/// This is a little lower than the block verify timeout. +pub const DEFAULT_MIN_WARN_TIME: Duration = Duration::from_secs(9 * 60); /// A guard that logs code execution time when dropped. #[derive(Debug)]