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()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()Return the lastRunTime |
long | getMaxPendingTime()Get the maximum pending/wait time for a single run of this job type. |
int | getMaxRecentEntries()Get the maximum number of recent execution entries tracked. |
long | getMaxTime()Get the maximum execution time for a single run of this job type. |
long | getMinPendingTime()Get the minimum pending/wait time for a single run of this job type. |
long | getMinTime()Get the minimum execution time for a single run of this job type. |
String | getName()Get the name of this job type. |
JobStats.RecentStats | getRecentStats()Return the recentStats |
long | getRuns()Get the total number of times this job type has run. |
long | getTotalPendingTime()Get the total pending/wait time for all runs of this job type. |
long | getTotalTime()Get the 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