Skip to content

Commit

Permalink
fixed the getTasks method and replaced the usage of deprecated set me…
Browse files Browse the repository at this point in the history
…thod

Signed-off-by: Ravi Kumar <kumarravi1165@gmail.com>
  • Loading branch information
rk1165 committed Dec 18, 2020
1 parent d5648c7 commit 69a2558
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void run()
{
long taskLatency = System.nanoTime() - start;
threadStats.decrement();
taskLatencyStats.set(taskLatency);
taskLatencyStats.record(taskLatency);
}
}

Expand Down Expand Up @@ -110,7 +110,7 @@ public void reset()
@ManagedAttribute("the number of tasks executed")
public long getTasks()
{
return taskLatencyStats.getTotal();
return taskLatencyStats.getCount();
}

/**
Expand Down

0 comments on commit 69a2558

Please sign in to comment.