fixed the getTasks method and replaced the usage of deprecated set method
Signed-off-by: Ravi Kumar <kumarravi1165@gmail.com>
This commit is contained in:
parent
d5648c73a1
commit
69a2558883
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue