Skip to content

Commit

Permalink
Improve processor logging
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed May 13, 2024
1 parent a808746 commit 42df0e2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 42df0e2

Please sign in to comment.