Merge pull request #5825 from rk1165/issue_5786

Issue #5786 : Revisit Statistics classes
This commit is contained in:
Simone Bordet 2021-01-12 17:15:44 +01:00 committed by GitHub
commit 03ec5bb773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ public class MonitoredQueuedThreadPool extends QueuedThreadPool
long queueLatency = System.nanoTime() - begin;
queueStats.decrement();
threadStats.increment();
queueLatencyStats.set(queueLatency);
queueLatencyStats.record(queueLatency);
long start = System.nanoTime();
try
{
@ -80,7 +80,7 @@ public class MonitoredQueuedThreadPool extends QueuedThreadPool
{
long taskLatency = System.nanoTime() - start;
threadStats.decrement();
taskLatencyStats.set(taskLatency);
taskLatencyStats.record(taskLatency);
}
}
@ -110,7 +110,7 @@ public class MonitoredQueuedThreadPool extends QueuedThreadPool
@ManagedAttribute("the number of tasks executed")
public long getTasks()
{
return taskLatencyStats.getTotal();
return taskLatencyStats.getCount();
}
/**