Class SlowRequestChecker
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
com.cloudbees.jenkins.support.slowrequest.SlowRequestChecker
- All Implemented Interfaces:
ExtensionPoint
,Runnable
Run periodically to find slow requests and track them.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnable
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
Provide a means to disable the slow request checker.static final int
How often to run the slow request checkerstatic final int
Time in milliseconds that's considered too slow for requests.Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN
-
Constructor Summary
-
Method Summary
Methods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, init
Methods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, run
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
RECURRENCE_PERIOD_SEC
public static final int RECURRENCE_PERIOD_SECHow often to run the slow request checker- Since:
- 2.12
-
THRESHOLD
public static final int THRESHOLDTime in milliseconds that's considered too slow for requests. Starting with a bit conservative value to catch serious offenders first. If this value is less than twiceRECURRENCE_PERIOD_SEC
then that will be used instead. -
DISABLED
public static volatile boolean DISABLEDProvide a means to disable the slow request checker. This is a volatile non-final field as if you run into issues in a running Jenkins you may need to disable without restarting Jenkins.- Since:
- 2.12
-
-
Constructor Details
-
SlowRequestChecker
public SlowRequestChecker()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()- Specified by:
getRecurrencePeriod
in classPeriodicWork
-
doRun
- Specified by:
doRun
in classSafeTimerTask
- Throws:
Exception
-