public class JobStats extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JobStats.RecentStats
Container for recent statistics within the sliding window @since 0.9.68+
|
| Constructor and Description |
|---|
JobStats(String name)
Create statistics tracker for a named job type.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAvgPendingTime()
Get the average pending/wait time for this job type.
|
double |
getAvgTime()
Get the average execution time for this job type.
|
long |
getDropped()
Get the number of jobs that were dropped.
|
long |
getLastRunTime()
Get the timestamp of the most recent job execution.
|
double |
getMaxPendingTimeDouble()
Get the maximum pending/wait time for a single run of this job type with sub-millisecond precision.
|
double |
getMaxTimeDouble()
Get the maximum execution time for a single run of this job type with sub-millisecond precision.
|
double |
getMinPendingTimeDouble()
Get the minimum pending/wait time for a single run of this job type with sub-millisecond precision.
|
double |
getMinTimeDouble()
Get the minimum execution time for a single run of this job type with sub-millisecond precision.
|
String |
getName()
Get the name of this job type.
|
JobStats.RecentStats |
getRecentStats() |
long |
getRuns()
Get the total number of times this job type has run.
|
double |
getTotalPendingTimeDouble()
Get the total pending/wait time for all runs of this job type with sub-millisecond precision.
|
double |
getTotalTimeDouble()
Get the total execution time for all runs of this job type with sub-millisecond precision.
|
void |
jobDropped()
Record that a job of this type was dropped due to overload.
|
void |
jobRan(double runTime,
double lag)
Record that a job of this type has executed with sub-millisecond precision.
|
public JobStats(String name)
name - the name identifier for this job typepublic double getAvgPendingTime()
public double getAvgTime()
public long getDropped()
public long getLastRunTime()
public double getMaxPendingTimeDouble()
public double getMaxTimeDouble()
public double getMinPendingTimeDouble()
public double getMinTimeDouble()
public String getName()
public JobStats.RecentStats getRecentStats()
public long getRuns()
public double getTotalPendingTimeDouble()
public double getTotalTimeDouble()
public void jobDropped()
public void jobRan(double runTime,
double lag)
runTime - the time in milliseconds the job took to execute (supports sub-millisecond values like 0.5 for 500μs)lag - the time in milliseconds the job spent waiting in the queue (supports sub-millisecond values)