|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.testelement.AbstractTestElement org.apache.jmeter.control.GenericController org.apache.jmeter.control.ThroughputController
public class ThroughputController
This class represents a controller that can control the number of times that it is executed, either by the total number of times the user wants the controller executed (BYNUMBER) or by the percentage of time it is called (BYPERCENT) The current implementation executes the first N samples (BYNUMBER) or the last N% of samples (BYPERCENT).
Field Summary | |
---|---|
static int |
BYNUMBER
|
static int |
BYPERCENT
|
Fields inherited from class org.apache.jmeter.control.GenericController |
---|
current, subControllersAndSamplers |
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
ThroughputController()
|
Method Summary | |
---|---|
Object |
clone()
|
String |
getMaxThroughput()
|
protected int |
getMaxThroughputAsInt()
|
String |
getPercentThroughput()
|
protected float |
getPercentThroughputAsFloat()
|
int |
getStyle()
|
boolean |
isDone()
Indicates whether the Controller is done delivering Samplers for the rest of the test. |
boolean |
isPerThread()
|
void |
iterationStart(LoopIterationEvent iterEvent)
Called when a loop iteration is about to start. |
Sampler |
next()
Determines the next sampler to be processed. |
void |
setMaxThroughput(int maxThroughput)
|
void |
setMaxThroughput(String maxThroughput)
|
void |
setPercentThroughput(float percentThroughput)
|
void |
setPercentThroughput(String percentThroughput)
|
void |
setPerThread(boolean perThread)
|
void |
setStyle(int style)
|
void |
testEnded()
Called once for all threads after the end of a test. |
void |
testEnded(String host)
Called once for all threads after the end of a test. |
void |
testStarted()
Called just before the start of the test from the main engine thread. |
void |
testStarted(String host)
Called just before the start of the test from the main engine thread. |
Methods inherited from class org.apache.jmeter.control.GenericController |
---|
addIterationListener, addTestElement, addTestElementOnce, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, isFirst, nextIsAController, nextIsASampler, nextIsNull, reInitialize, reInitializeSubController, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoop |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jmeter.testelement.TestElement |
---|
canRemove, clear, clearTestElementChildren, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse |
Field Detail |
---|
public static final int BYNUMBER
public static final int BYPERCENT
Constructor Detail |
---|
public ThroughputController()
Method Detail |
---|
public void setStyle(int style)
public int getStyle()
public void setPerThread(boolean perThread)
public boolean isPerThread()
public void setMaxThroughput(int maxThroughput)
public void setMaxThroughput(String maxThroughput)
public String getMaxThroughput()
protected int getMaxThroughputAsInt()
public void setPercentThroughput(float percentThroughput)
public void setPercentThroughput(String percentThroughput)
public String getPercentThroughput()
protected float getPercentThroughputAsFloat()
public Sampler next()
GenericController
Determines the next sampler to be processed.
If isDone, returns null.
Gets the list element using current pointer.
If this is null, calls GenericController.nextIsNull()
.
If the list element is a sampler, calls GenericController.nextIsASampler(Sampler)
,
otherwise calls GenericController.nextIsAController(Controller)
If any of the called methods throws NextIsNullException, returns null, otherwise the value obtained above is returned.
next
in interface Controller
next
in class GenericController
Controller.next()
public boolean isDone()
Controller
isDone
in interface Controller
isDone
in class GenericController
Controller.isDone()
public Object clone()
clone
in interface TestElement
clone
in class AbstractTestElement
public void iterationStart(LoopIterationEvent iterEvent)
LoopIterationListener
iterationStart
in interface LoopIterationListener
iterEvent
- the eventpublic void testStarted()
TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
StandardJMeterEngine.run()
public void testStarted(String host)
TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
host
- name of hostStandardJMeterEngine.run()
public void testEnded()
TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
StandardJMeterEngine.stopTest()
public void testEnded(String host)
TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
host
- name of hostStandardJMeterEngine.stopTest()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |