java.lang.Object
org.camunda.bpm.qa.performance.engine.framework.PerfTestRun
All Implemented Interfaces:
Runnable, PerfTestRunContext

public class PerfTestRun extends Object implements PerfTestRunContext, Runnable
An individual run of a performance test. Holds all state related to a test run.
Author:
Daniel Meyer
  • Field Details

    • isStarted

      protected boolean isStarted
    • runStartTime

      protected long runStartTime
    • runEndTime

      protected long runEndTime
    • stepStartTime

      protected long stepStartTime
    • stepEndTime

      protected long stepEndTime
    • currentStep

      protected volatile PerfTestStep currentStep
    • state

      protected AtomicInteger state
    • runner

      protected PerfTestRunner runner
    • runContext

      protected Map<String,Object> runContext
  • Constructor Details

  • Method Details

    • startRun

      public void startRun()
    • endRun

      public void endRun()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • continueRun

      protected void continueRun()
    • pauseRun

      protected void pauseRun()
    • getVariable

      public <T> T getVariable(String name)
      Specified by:
      getVariable in interface PerfTestRunContext
    • setVariable

      public void setVariable(String name, Object value)
      Specified by:
      setVariable in interface PerfTestRunContext
    • setCurrentStep

      public void setCurrentStep(PerfTestStep currentStep)
    • getRunStartTime

      public long getRunStartTime()
    • getRunEndTime

      public long getRunEndTime()
    • getCurrentStep

      public PerfTestStep getCurrentStep()
    • getRunner

      public PerfTestRunner getRunner()
    • getStepEndTime

      public long getStepEndTime()
    • getStepStartTime

      public long getStepStartTime()
    • isAlreadySignaled

      public boolean isAlreadySignaled()
      Sets the run into waiting state and returns if the run was already signaled. Note: This method will change the state of the run to waiting.
      Returns:
      true if the run was already signaled, false otherwise
    • isWaitingForSignal

      public boolean isWaitingForSignal()
      Signals the run and returns if the run was already waiting for a signal. Note: This method will change the state of the run to signaled.
      Returns:
      true if the run was waiting, false otherwise
    • notifyWatchersStartRun

      protected void notifyWatchersStartRun()
    • notifyWatchersEndRun

      protected void notifyWatchersEndRun()
    • notifyWatchersBeforeStep

      protected void notifyWatchersBeforeStep()
    • notifyWatchersAfterStep

      protected void notifyWatchersAfterStep()
    • logStepResult

      public void logStepResult(Object stepResult)