Class SlowRequestThreadDumpsGenerator

java.lang.Object
java.lang.Thread
com.cloudbees.jenkins.support.slowrequest.SlowRequestThreadDumpsGenerator
All Implemented Interfaces:
Runnable

@Extension public class SlowRequestThreadDumpsGenerator extends Thread
Thread in charge of generating the set of thread dumps during a slowRequest scenario.
Author:
Ignacio Roncero
  • Field Details

    • RECURRENCE_PERIOD_MIN

      public static final long RECURRENCE_PERIOD_MIN
      How 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_COUNT
      The 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_ITERATIONS
      Number of ThreadDump that will be generated during the slowRequest scenario
    • FREQUENCY_SEC

      public static final int FREQUENCY_SEC
      Time 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_RETAIN
      Limit the number of thread dumps to retain on slowRequest scenario
    • logs

      protected final FileListCap logs
      Thread dumps generated on slowRequest scenario are stored in $JENKINS_HOME/support/slow-request-threaddumps
    • DISABLED

      public static boolean DISABLED
      Provide a means to disable the slow request thread dump checker.
  • Constructor Details

    • SlowRequestThreadDumpsGenerator

      public SlowRequestThreadDumpsGenerator(long iota)
    • SlowRequestThreadDumpsGenerator

      public SlowRequestThreadDumpsGenerator()
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • checkThreadDumpsTrigger

      public static boolean checkThreadDumpsTrigger(long iota)