Class ThroughputController
- All Implemented Interfaces:
Serializable
,Cloneable
,Controller
,LoopIterationListener
,Searchable
,org.apache.jmeter.testelement.TestElement
,TestStateListener
,TestCompilerHelper
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement
org.apache.jmeter.testelement.TestElement.Companion
-
Field Summary
Fields inherited from class org.apache.jmeter.control.GenericController
current, subControllersAndSamplers
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
protected int
protected float
int
getStyle()
boolean
isDone()
Indicates whether the Controller is done delivering Samplers for the rest of the test.boolean
void
iterationStart
(LoopIterationEvent iterEvent) Called when a loop iteration is about to start.next()
Determines the next sampler to be processed.protected Object
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
Called once for all threads after the end of a test.void
Called once for all threads after the end of a test.void
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, getProps, getSchema, getSubControllers, incrementCurrent, incrementIterCount, initialize, initializeSubControllers, isFirst, nextIsAController, nextIsASampler, nextIsNull, reInitialize, removeCurrentElement, removeIterationListener, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst, triggerEndOfLoop
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addPropertiesValues, addProperty, addProperty, canRemove, clear, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
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, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getPropertyOrNull, getString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, removeProperty, set, set, set, set, set, set, set, set, set, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Field Details
-
BYNUMBER
public static final int BYNUMBER- See Also:
-
BYPERCENT
public static final int BYPERCENT- See Also:
-
-
Constructor Details
-
ThroughputController
public ThroughputController()
-
-
Method Details
-
setStyle
public void setStyle(int style) -
getStyle
public int getStyle() -
setPerThread
public void setPerThread(boolean perThread) -
isPerThread
public boolean isPerThread() -
setMaxThroughput
public void setMaxThroughput(int maxThroughput) -
setMaxThroughput
-
getMaxThroughput
-
getMaxThroughputAsInt
protected int getMaxThroughputAsInt() -
setPercentThroughput
public void setPercentThroughput(float percentThroughput) -
setPercentThroughput
-
getPercentThroughput
-
getPercentThroughputAsFloat
protected float getPercentThroughputAsFloat() -
next
Description copied from class:GenericController
Determines the next sampler to be processed.
If
GenericController.isDone()
istrue
, returns null.Gets the list element using current pointer. If this is
null
, callsGenericController.nextIsNull()
.If the list element is a
Sampler
, callsGenericController.nextIsASampler(Sampler)
, otherwise callsGenericController.nextIsAController(Controller)
If any of the called methods throws
NextIsNullException
, returnsnull
, otherwise the value obtained above is returned.- Specified by:
next
in interfaceController
- Overrides:
next
in classGenericController
- Returns:
- the next sampler or
null
-
isDone
public boolean isDone()Description copied from interface:Controller
Indicates whether the Controller is done delivering Samplers for the rest of the test. When the top-level controller returns true to JMeterThread, the thread is complete.- Specified by:
isDone
in interfaceController
- Overrides:
isDone
in classGenericController
- Returns:
- boolean
- See Also:
-
clone
- Specified by:
clone
in interfaceorg.apache.jmeter.testelement.TestElement
- Overrides:
clone
in classAbstractTestElement
-
iterationStart
Description copied from interface:LoopIterationListener
Called when a loop iteration is about to start.- Specified by:
iterationStart
in interfaceLoopIterationListener
- Parameters:
iterEvent
- the event
-
testStarted
public void testStarted()Description copied from interface: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.
- Specified by:
testStarted
in interfaceTestStateListener
- See Also:
-
testStarted
Description copied from interface: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.
- Specified by:
testStarted
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
-
testEnded
public void testEnded()Description copied from interface: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.
- Specified by:
testEnded
in interfaceTestStateListener
- See Also:
-
testEnded
Description copied from interface: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.
- Specified by:
testEnded
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
-
readResolve
- Overrides:
readResolve
in classGenericController
-