Class ConstantThroughputTimer
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testbeans.TestBean
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.testelement.TestStateListener
,org.apache.jmeter.timers.Timer
public class ConstantThroughputTimer extends AbstractTestElement implements Timer, TestStateListener, TestBean
This class implements a constant throughput timer. A Constant Throughput Timer paces the samplers under its influence so that the total number of samples per unit of time approaches a given constant as much as possible. There are two different ways of pacing the requests: - delay each thread according to when it last ran - delay each thread according to when any thread last ran
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
ConstantThroughputTimer.Mode
This enum defines the calculation modes used by the ConstantThroughputTimer.
-
Field Summary
Fields Modifier and Type Field Description public final static String
THROUGHPUT
public final static String
CALC_MODE
public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor Description ConstantThroughputTimer()
Constructor for a non-configured ConstantThroughputTimer.
-
Method Summary
Modifier and Type Method Description void
setThroughput(double throughput)
Sets the desired throughput. double
getThroughput()
Gets the configured desired throughput. int
getCalcMode()
void
setCalcMode(int mode)
long
delay()
Retrieve the delay to use during test execution. String
toString()
Provide a description of this timer class. void
testStarted()
Get the timer ready to compute delays for a new test. void
setProperty(JMeterProperty property)
Override the setProperty method in order to convert the original String calcMode property. void
testEnded()
void
testStarted(String host)
void
testEnded(String host)
-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.timers.Timer
isModifiable
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setThroughput
void setThroughput(double throughput)
Sets the desired throughput.
- Parameters:
throughput
- Desired sampling rate, in samples per minute.
-
getThroughput
double getThroughput()
Gets the configured desired throughput.
-
getCalcMode
int getCalcMode()
-
setCalcMode
void setCalcMode(int mode)
-
delay
long delay()
Retrieve the delay to use during test execution.
-
toString
String toString()
Provide a description of this timer class. TODO: Is this ever used? I can't remember where. Remove if it isn't -- TODO: or obtain text from bean's displayName or shortDescription.
-
testStarted
void testStarted()
Get the timer ready to compute delays for a new test.
-
setProperty
void setProperty(JMeterProperty property)
Override the setProperty method in order to convert the original String calcMode property. This used the locale-dependent display value, so caused problems when the language was changed. Note that the calcMode StringProperty is replaced with an IntegerProperty so the conversion only needs to happen once.
-
testEnded
void testEnded()
-
testStarted
void testStarted(String host)
-
-
-
-