Package org.apache.jmeter.timers
Class SyncTimer
-
- 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.testelement.ThreadListener,org.apache.jmeter.timers.Timer
public class SyncTimer extends AbstractTestElement implements Timer, Serializable, TestBean, TestStateListener, ThreadListener
The purpose of the SyncTimer is to block threads until X number of threads have been blocked, and then they are all released at once. A SyncTimer can thus create large instant loads at various points of the test plan.
-
-
Field Summary
Fields Modifier and Type Field Description public intgroupSizepublic longtimeoutInMspublic transient JMeterContextthreadContextpublic transient StringthreadNamepublic final static TestElement.CompanionCompanionpublic final static StringNAMEpublic final static StringGUI_CLASSpublic final static StringENABLEDpublic final static StringTEST_CLASSpublic final static StringCOMMENTS
-
Constructor Summary
Constructors Constructor Description SyncTimer()
-
Method Summary
Modifier and Type Method Description intgetGroupSize()voidsetGroupSize(int numThreads)longgetTimeoutInMs()voidsetTimeoutInMs(long timeoutInMs)longdelay()Objectclone()We have to control the cloning process because we need some cross-thread communication if our synctimers are to be able to determine when to block and when to release. voidtestEnded()voidtestEnded(String host)Reset timerCounter voidtestStarted()voidtestStarted(String host)Reset timerCounter voidthreadStarted()voidthreadFinished()-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, 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
-
getGroupSize
int getGroupSize()
- Returns:
Returns the numThreads.
-
setGroupSize
void setGroupSize(int numThreads)
- Parameters:
numThreads- The numThreads to set.
-
getTimeoutInMs
long getTimeoutInMs()
- Returns:
the timeoutInMs
-
setTimeoutInMs
void setTimeoutInMs(long timeoutInMs)
- Parameters:
timeoutInMs- the timeoutInMs to set
-
delay
long delay()
-
clone
Object clone()
We have to control the cloning process because we need some cross-thread communication if our synctimers are to be able to determine when to block and when to release.
-
testEnded
void testEnded()
-
testStarted
void testStarted()
-
testStarted
void testStarted(String host)
Reset timerCounter
-
threadStarted
void threadStarted()
-
threadFinished
void threadFinished()
-
-
-
-