public class JobStats extends Object
| Modifier and Type | Class and Description |
|---|---|
static class | JobStats.RecentStatsRecentStats. |
| Constructor and Description |
|---|
JobStats(String name)Create statistics tracker for a named job type. |
| Modifier and Type | Method and Description |
|---|---|
static void | disableRecentTracking()Force disable recent tracking immediately. |
static void | enableRecentTracking()Enable recent execution tracking for a period of time. |
double | getAvgPendingTime()Average pending/wait time for this job type. |
double | getAvgTime()Average execution time for this job type. |
long | getDropped()Number of jobs that were dropped. |
long | getLastRunTime()Time of the last run. |
long | getMaxPendingTime()Maximum pending/wait time for a single run of this job type. |
int | getMaxRecentEntries()Maximum number of recent execution entries tracked. |
long | getMaxTime()Maximum execution time for a single run of this job type. |
long | getMinPendingTime()Minimum pending/wait time for a single run of this job type. |
long | getMinTime()Minimum execution time for a single run of this job type. |
String | getName()Name of this job type. |
JobStats.RecentStats | getRecentStats()Return the recentStats |
long | getRuns()Total number of times this job type has run. |
long | getTotalPendingTime()Total pending/wait time for all runs of this job type. |
long | getTotalTime()Total execution time for all runs of this job type. |
static boolean | isRecentTrackingEnabled()Check if recent tracking should be active. |
void | jobDropped()Record that a job of this type was dropped due to overload. |
void | jobRan(long runTime,
long lag)Record that a job of this type has executed. |
public JobStats(String name)
name - the namepublic static void disableRecentTracking()
public static void enableRecentTracking()
public double getAvgPendingTime()
public double getAvgTime()
public long getDropped()
public long getLastRunTime()
public long getMaxPendingTime()
public int getMaxRecentEntries()
public long getMaxTime()
public long getMinPendingTime()
public long getMinTime()
public String getName()
public JobStats.RecentStats getRecentStats()
public long getRuns()
public long getTotalPendingTime()
public long getTotalTime()
public static boolean isRecentTrackingEnabled()
public void jobDropped()
public void jobRan(long runTime,
long lag)runTime - the time in milliseconds the job took to executelag - the time in milliseconds the job spent waiting in the queue