org.rutil.loadtest
Class RequestBoundLoadGenerator

java.lang.Object
  extended by org.rutil.loadtest.LoadGenerator
      extended by org.rutil.loadtest.RequestBoundLoadGenerator

public class RequestBoundLoadGenerator
extends LoadGenerator

A request based implementation of LoadGenerator. This class submits a fixed number of test runner requests (concurrently) at fixed intervals until the total run-time meets or exceeds the "duration". This is useful in cases where a constant load needs to be thrown at the server and measure the performance/latency etc.

Author:
mohan

Field Summary
 
Fields inherited from class org.rutil.loadtest.LoadGenerator
durationInSecs, name, statsHandler, testRunner
 
Constructor Summary
RequestBoundLoadGenerator(java.lang.String name, TestRunner testRunner)
           
 
Method Summary
protected  Stats doStart()
           
 int getMaxConcurrent()
           
 int getRequestIntervalInSecs()
           
 int getRequestsPerInterval()
           
 void setMaxConcurrent(int maxConcurrent)
           
 void setRequestIntervalInSecs(int requestIntervalInSecs)
           
 void setRequestsPerInterval(int requestsPerInterval)
           
 java.lang.String toString()
           
 
Methods inherited from class org.rutil.loadtest.LoadGenerator
getDurationInSecs, getName, getStatsHandler, getTestRunner, isEnabled, setDurationInSecs, setEnabled, setStatsHandler, start, statsHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestBoundLoadGenerator

public RequestBoundLoadGenerator(java.lang.String name,
                                 TestRunner testRunner)
Method Detail

getRequestIntervalInSecs

public int getRequestIntervalInSecs()

setRequestIntervalInSecs

public void setRequestIntervalInSecs(int requestIntervalInSecs)

getRequestsPerInterval

public int getRequestsPerInterval()

setRequestsPerInterval

public void setRequestsPerInterval(int requestsPerInterval)

getMaxConcurrent

public int getMaxConcurrent()

setMaxConcurrent

public void setMaxConcurrent(int maxConcurrent)

doStart

protected Stats doStart()
Specified by:
doStart in class LoadGenerator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object