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.ExceptionRunnableNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanProvide a means to disable the slow request checker.static final intHow often to run the slow request checkerstatic final intTime in milliseconds that's considered too slow for requests.Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, initMethods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, runMethods 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_SECthen 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:
getRecurrencePeriodin classPeriodicWork
-
doRun
- Specified by:
doRunin classSafeTimerTask- Throws:
Exception
-