org.rutil.loadtest
Class ThreadBoundLoadGenerator
java.lang.Object
org.rutil.loadtest.LoadGenerator
org.rutil.loadtest.ThreadBoundLoadGenerator
public class ThreadBoundLoadGenerator
- extends LoadGenerator
A thread based implementation of LoadGenerator. The number of concurrent requests sent to the test
runner = number of threads. Each thread executes the tests sequentially for a defined "duration" of
time.
There are two exit points for this load generator
1. Max Number of threads/Duration. Exits once it reaches max number of threads and after each of those
threads have executed for the "duration"
2. Avg latency/Duration. Exits once the avg latency exceeds the avg threshold and after all the threads
have executed for the "duration".
This is useful to find the upper bound on the number of concurrent requests (threads) that a server can handle
while maintianing latency at or below the defined threshold or to just throw a constant load on the server.
- Author:
- mohan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ThreadBoundLoadGenerator
public ThreadBoundLoadGenerator(java.lang.String name,
TestRunner testRunner)
isRunSingleThreadTest
public boolean isRunSingleThreadTest()
getInitialThreads
public int getInitialThreads()
setInitialThreads
public void setInitialThreads(int initialThreads)
getMaxThreads
public int getMaxThreads()
setMaxThreads
public void setMaxThreads(int maxThreads)
getStepSize
public int getStepSize()
setStepSize
public void setStepSize(int stepSize)
getLatencyCutoffInMillis
public float getLatencyCutoffInMillis()
setLatencyCutoffInMillis
public void setLatencyCutoffInMillis(float latencyCutoffInMillis)
doStart
protected Stats doStart()
- Specified by:
doStart in class LoadGenerator
continueTest
protected boolean continueTest(Stats stats)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object