Class PerfTestRun

  • All Implemented Interfaces:
    java.lang.Runnable, PerfTestRunContext

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

      • isStarted

        protected boolean isStarted
      • runStartTime

        protected long runStartTime
      • runEndTime

        protected long runEndTime
      • stepStartTime

        protected long stepStartTime
      • stepEndTime

        protected long stepEndTime
      • state

        protected java.util.concurrent.atomic.AtomicInteger state
      • runContext

        protected java.util.Map<java.lang.String,​java.lang.Object> runContext
    • Method Detail

      • startRun

        public void startRun()
      • endRun

        public void endRun()
      • run

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

        protected void continueRun()
      • pauseRun

        protected void pauseRun()
      • setVariable

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

        public void setCurrentStep​(PerfTestStep currentStep)
      • getRunStartTime

        public long getRunStartTime()
      • getRunEndTime

        public long getRunEndTime()
      • 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​(java.lang.Object stepResult)