public class ConstantThroughputTimer extends AbstractTestElement implements Timer, TestStateListener, TestBean
Modifier and Type | Class and Description |
---|---|
static class |
ConstantThroughputTimer.Mode
This enum defines the calculation modes used by the ConstantThroughputTimer.
|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
ConstantThroughputTimer()
Constructor for a non-configured ConstantThroughputTimer.
|
Modifier and Type | Method and Description |
---|---|
protected long |
calculateCurrentTarget(long currentTime)
Calculate the target time by adding the result of private method
calculateDelay() to the given currentTime |
long |
delay()
Retrieve the delay to use during test execution.
|
int |
getCalcMode() |
double |
getThroughput()
Gets the configured desired throughput.
|
void |
setCalcMode(int mode) |
void |
setProperty(JMeterProperty property)
Override the setProperty method in order to convert
the original String calcMode property.
|
void |
setThroughput(double throughput)
Sets the desired throughput.
|
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()
Get the timer ready to compute delays for a new test.
|
void |
testStarted(String host)
Called just before the start of the test from the main engine thread.
|
String |
toString()
Provide a description of this timer class.
|
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, wait, wait, wait
isModifiable
removed
public ConstantThroughputTimer()
public void setThroughput(double throughput)
throughput
- Desired sampling rate, in samples per minute.public double getThroughput()
public int getCalcMode()
public void setCalcMode(int mode)
public long delay()
delay
in interface Timer
Timer.delay()
protected long calculateCurrentTarget(long currentTime)
calculateDelay()
to the given currentTime
currentTime
- time in mspublic String toString()
public void testStarted()
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 setProperty(JMeterProperty property)
setProperty
in interface TestElement
setProperty
in class AbstractTestElement
property
- the property to be setpublic void testEnded()
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 testStarted(String host)
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(String host)
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()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.