org.apache.commons.performance
Class TesterClientThread

java.lang.Object
  extended by org.apache.commons.performance.ClientThread
      extended by org.apache.commons.performance.TesterClientThread
All Implemented Interfaces:
Runnable

public class TesterClientThread
extends org.apache.commons.performance.ClientThread

Test ClientThread


Field Summary
 
Fields inherited from class org.apache.commons.performance.ClientThread
logger, PEAK_LOAD, RAMPING_DOWN, RAMPING_UP, randomData, stats, TROUGH_LOAD
 
Constructor Summary
TesterClientThread(long iterations, long minDelay, long maxDelay, double sigma, String delayType, long rampPeriod, long peakPeriod, long troughPeriod, String cycleType, String rampType, Logger logger, org.apache.commons.performance.Statistics stats, long minServiceDelay, long maxServiceDelay, double meanServiceDelay, double sigmaServiceDelay, String serviceDelayType)
           
 
Method Summary
protected  void cleanUp()
          Executed in finally block of iteration try-catch
 void execute()
          Simulate server latency using service latency parameters
protected  void finish()
          Executed once after the run finishes
 long getSetups()
           
 long getTearDowns()
           
protected  void init()
          Executed once at the beginning of the run
 boolean isFinalized()
           
 boolean isHurling()
           
 boolean isInitialized()
           
 void setHurling(boolean hurling)
           
protected  void setUp()
          Executed at the beginning of each iteration
 
Methods inherited from class org.apache.commons.performance.ClientThread
adjustState, computeCyclicDelay, getCycleState, getCycleType, getDelayType, getIterations, getLastMean, getMaxDelay, getMinDelay, getNumErrors, getNumMisses, getPeakPeriod, getPeriodStart, getRampPeriod, getRampType, getSigma, getStartTime, getStats, getTroughPeriod, nextDelay, run, setCycleState, setDelayType, setLastMean, setMaxDelay, setMinDelay, setNumErrors, setNumMisses, setPeakPeriod, setPeriodStart, setRampPeriod, setRampType, setSigma, setStartTime, setTroughPeriod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TesterClientThread

public TesterClientThread(long iterations,
                          long minDelay,
                          long maxDelay,
                          double sigma,
                          String delayType,
                          long rampPeriod,
                          long peakPeriod,
                          long troughPeriod,
                          String cycleType,
                          String rampType,
                          Logger logger,
                          org.apache.commons.performance.Statistics stats,
                          long minServiceDelay,
                          long maxServiceDelay,
                          double meanServiceDelay,
                          double sigmaServiceDelay,
                          String serviceDelayType)
Method Detail

isHurling

public boolean isHurling()

setHurling

public void setHurling(boolean hurling)

init

protected void init()
             throws Exception
Executed once at the beginning of the run

Overrides:
init in class org.apache.commons.performance.ClientThread
Throws:
Exception

setUp

protected void setUp()
              throws Exception
Executed at the beginning of each iteration

Overrides:
setUp in class org.apache.commons.performance.ClientThread
Throws:
Exception

cleanUp

protected void cleanUp()
                throws Exception
Executed in finally block of iteration try-catch

Overrides:
cleanUp in class org.apache.commons.performance.ClientThread
Throws:
Exception

finish

protected void finish()
               throws Exception
Executed once after the run finishes

Overrides:
finish in class org.apache.commons.performance.ClientThread
Throws:
Exception

isInitialized

public boolean isInitialized()

isFinalized

public boolean isFinalized()

getSetups

public long getSetups()

getTearDowns

public long getTearDowns()

execute

public void execute()
             throws Exception
Simulate server latency using service latency parameters

Specified by:
execute in class org.apache.commons.performance.ClientThread
Throws:
Exception


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.