From 42df0e2cd801295eb52415b6bbc51a74eaedf062 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Mon, 13 May 2024 11:18:09 +0200 Subject: [PATCH] Improve processor logging Signed-off-by: Paolo Di Tommaso --- .../nextflow/processor/TaskPollingMonitor.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy index 196dc92f84..09b72f0f6b 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy @@ -426,10 +426,16 @@ class TaskPollingMonitor implements TaskMonitor { protected void pollLoop() { int iteration=0 + int previous=-1 while( true ) { final long time = System.currentTimeMillis() final tasks = new ArrayList(runningQueue) - log.trace "Scheduler queue size: ${tasks.size()} (iteration: ${++iteration})" + final sz = tasks.size() + ++iteration + if( log.isTraceEnabled() && sz!=previous ) { + log.trace "Scheduler queue size: ${sz} (iteration: ${iteration})" + previous = sz + } // check all running tasks for termination checkAllTasks(tasks) @@ -457,7 +463,7 @@ class TaskPollingMonitor implements TaskMonitor { } protected dumpCurrentThreads() { - log.trace "Current runnign threads:\n${dumpThreads()}" + log.trace "Current running threads:\n${dumpThreads()}" } protected void dumpRunningQueue() {