From 243a5fa6a8d126b9ae1df0bb388c445b42d0a653 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Thu, 20 Feb 2025 14:17:34 +0100 Subject: [PATCH] Log the call trace and congestion --- crates/index-scheduler/src/scheduler/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/index-scheduler/src/scheduler/mod.rs b/crates/index-scheduler/src/scheduler/mod.rs index bcf53127b..42ed92839 100644 --- a/crates/index-scheduler/src/scheduler/mod.rs +++ b/crates/index-scheduler/src/scheduler/mod.rs @@ -352,6 +352,17 @@ impl IndexScheduler { congestion_info }); + if let Some(congestion) = congestion { + tracing::debug!( + "Channel congestion metrics - Attempts: {}, Blocked attempts: {} ({:.1}% congestion)", + congestion.attempts, + congestion.blocking_attempts, + congestion.congestion_ratio(), + ); + } + + tracing::debug!("call trace: {:?}", progress.accumulated_durations()); + self.queue.write_batch(&mut wtxn, processing_batch, &ids)?; #[cfg(test)]