Class SlowRequestThreadDumpsGenerator
java.lang.Object
java.lang.Thread
com.cloudbees.jenkins.support.slowrequest.SlowRequestThreadDumpsGenerator
- All Implemented Interfaces:
Runnable
Thread in charge of generating the set of thread dumps during a slowRequest scenario.
- Author:
- Ignacio Roncero
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
Provide a means to disable the slow request thread dump checker.static final int
Time in seconds that we will wait between the ThreadDump generations (under the same slowRequest check)protected final FileListCap
Thread dumps generated on slowRequest scenario are stored in $JENKINS_HOME/support/slow-request-threaddumpsstatic final int
The minimal number of SlowRequest found at the same time (in the last 3 seconds) to trigger the ThreadDump generationstatic final long
How often (at minimum) we will capture the ThreadDump under a slowRequest scenario.static final int
Limit the number of thread dumps to retain on slowRequest scenariostatic final int
Number of ThreadDump that will be generated during the slowRequest scenarioFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
RECURRENCE_PERIOD_MIN
public static final long RECURRENCE_PERIOD_MINHow often (at minimum) we will capture the ThreadDump under a slowRequest scenario. For example, if we set this value to 30 minutes, we will not generate any threadDumps the next 30 minutes after the last generated threadDumps even though we are finding slowRequest during those 30 minutes. This value will help us avoid stressing the system regarding performance. -
MINIMAL_SLOW_REQUEST_COUNT
public static final int MINIMAL_SLOW_REQUEST_COUNTThe minimal number of SlowRequest found at the same time (in the last 3 seconds) to trigger the ThreadDump generation -
TOTAL_ITERATIONS
public static final int TOTAL_ITERATIONSNumber of ThreadDump that will be generated during the slowRequest scenario -
FREQUENCY_SEC
public static final int FREQUENCY_SECTime in seconds that we will wait between the ThreadDump generations (under the same slowRequest check) -
SLOW_REQUEST_THREAD_DUMPS_TO_RETAIN
public static final int SLOW_REQUEST_THREAD_DUMPS_TO_RETAINLimit the number of thread dumps to retain on slowRequest scenario -
logs
Thread dumps generated on slowRequest scenario are stored in $JENKINS_HOME/support/slow-request-threaddumps -
DISABLED
public static boolean DISABLEDProvide a means to disable the slow request thread dump checker.
-
-
Constructor Details
-
SlowRequestThreadDumpsGenerator
public SlowRequestThreadDumpsGenerator(long iota) -
SlowRequestThreadDumpsGenerator
public SlowRequestThreadDumpsGenerator()
-
-
Method Details