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 int
groupSize
public long
timeoutInMs
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 SyncTimer()
-
Method Summary
Modifier and Type Method Description int
getGroupSize()
void
setGroupSize(int numThreads)
long
getTimeoutInMs()
void
setTimeoutInMs(long timeoutInMs)
long
delay()
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. void
testEnded()
void
testEnded(String host)
Reset timerCounter void
testStarted()
void
testStarted(String host)
Reset timerCounter void
threadStarted()
void
threadFinished()
-
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()
-
-
-
-