Skip to content

Commit

Permalink
enable logging when there is 0 pipeline usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Sep 14, 2022
1 parent f16051b commit 6867013
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
15 changes: 6 additions & 9 deletions comms/core/src/pipeline/inbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,12 @@ where

let num_available = self.executor.num_available();
let max_available = self.executor.max_available();
// Only emit this message if there is any concurrent usage
if num_available < max_available {
debug!(
target: LOG_TARGET,
"Inbound pipeline usage: {}/{}",
max_available - num_available,
max_available
);
}
debug!(
target: LOG_TARGET,
"Inbound pipeline usage: {}/{}",
max_available - num_available,
max_available
);

let id = current_id;
current_id = (current_id + 1) % u64::MAX;
Expand Down
15 changes: 6 additions & 9 deletions comms/core/src/pipeline/outbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,12 @@ where
// Pipeline IN received a message. Spawn a new task for the pipeline
let num_available = self.executor.num_available();
if let Some(max_available) = self.executor.max_available() {
// Only emit this message if there is any concurrent usage
if num_available < max_available {
debug!(
target: LOG_TARGET,
"Outbound pipeline usage: {}/{}",
max_available - num_available,
max_available
);
}
debug!(
target: LOG_TARGET,
"Outbound pipeline usage: {}/{}",
max_available - num_available,
max_available
);
}
let pipeline = self.config.pipeline.clone();
let id = current_id;
Expand Down

0 comments on commit 6867013

Please sign in to comment.