|
Apache JMeter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.threads.AbstractThreadGroup
org.apache.jmeter.threads.ThreadGroup
public class ThreadGroup
ThreadGroup holds the settings for a JMeter thread group. This class is intended to be ThreadSafe.
| Field Summary | |
|---|---|
static String |
DELAY
Scheduler start delay, overrides start time |
static String |
DELAYED_START
Whether thread startup is delayed until required |
static String |
DURATION
Scheduler duration, overrides end time |
static String |
END_TIME
Scheduler absolute end time |
static String |
RAMP_TIME
Ramp-up time |
static String |
SCHEDULER
Whether scheduler is being used |
static String |
START_TIME
Scheduler absolute start time |
| Fields inherited from class org.apache.jmeter.threads.AbstractThreadGroup |
|---|
MAIN_CONTROLLER, NUM_THREADS, ON_SAMPLE_ERROR, ON_SAMPLE_ERROR_CONTINUE, ON_SAMPLE_ERROR_START_NEXT_LOOP, ON_SAMPLE_ERROR_STOPTEST, ON_SAMPLE_ERROR_STOPTEST_NOW, ON_SAMPLE_ERROR_STOPTHREAD |
| Fields inherited from interface org.apache.jmeter.testelement.TestElement |
|---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
| Constructor Summary | |
|---|---|
ThreadGroup()
No-arg constructor. |
|
| Method Summary | |
|---|---|
long |
getDelay()
Get the startup delay |
long |
getDuration()
Get the desired duration of the thread group test run |
long |
getEndTime()
Get the end time value. |
int |
getRampUp()
Get the ramp-up value. |
boolean |
getScheduler()
Get whether scheduler is being used |
long |
getStartTime()
Get the absolute start time value. |
int |
numberOfActiveThreads()
|
void |
setDelay(long delay)
Set the startup delay |
void |
setDuration(long duration)
Set the desired duration of the thread group test run |
void |
setEndTime(long etime)
Set the EndTime value. |
void |
setRampUp(int rampUp)
Set the ramp-up value. |
void |
setScheduler(boolean Scheduler)
Set whether scheduler is being used |
void |
setStartTime(long stime)
Set the absolute StartTime value. |
void |
start(int groupCount,
ListenerNotifier notifier,
ListedHashTree threadGroupTree,
StandardJMeterEngine engine)
|
void |
stop()
For each thread, invoke: JMeterThread.stop() - set stop flag
|
boolean |
stopThread(String threadName,
boolean now)
Stop thread called threadName: stop JMeter thread interrupt JMeter thread interrupt underlying thread |
void |
tellThreadsToStop()
For each thread, invoke: JMeterThread.stop() - set stop flag
JMeterThread.interrupt() - interrupt sampler
Thread.interrupt() - interrupt JVM thread
|
void |
threadFinished(JMeterThread thread)
Called by JMeterThread when it finishes |
boolean |
verifyThreadsStopped()
|
void |
waitThreadsStopped()
Wait for all Group Threads to stop |
| Methods inherited from class org.apache.jmeter.threads.AbstractThreadGroup |
|---|
addIterationListener, addTestElement, addTestElementOnce, getNumberOfThreads, getNumThreads, getOnErrorStartNextLoop, getOnErrorStopTest, getOnErrorStopTestNow, getOnErrorStopThread, getSamplerController, initialize, isDone, next, removeIterationListener, setNumThreads, setSamplerController, startNextLoop, triggerEndOfLoop |
| 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, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse |
| Field Detail |
|---|
public static final String RAMP_TIME
public static final String DELAYED_START
public static final String SCHEDULER
public static final String START_TIME
public static final String END_TIME
public static final String DURATION
public static final String DELAY
| Constructor Detail |
|---|
public ThreadGroup()
| Method Detail |
|---|
public void setScheduler(boolean Scheduler)
Scheduler - true is scheduler is to be usedpublic boolean getScheduler()
public void setStartTime(long stime)
stime - -
the StartTime value.public long getStartTime()
public long getDuration()
public void setDuration(long duration)
duration - in secondspublic long getDelay()
public void setDelay(long delay)
delay - in secondspublic void setEndTime(long etime)
etime - -
the EndTime value.public long getEndTime()
public void setRampUp(int rampUp)
rampUp - the ramp-up value.public int getRampUp()
public void start(int groupCount,
ListenerNotifier notifier,
ListedHashTree threadGroupTree,
StandardJMeterEngine engine)
start in class AbstractThreadGroup
public boolean stopThread(String threadName,
boolean now)
stopThread in class AbstractThreadGroupthreadName - String thread namenow - boolean for stop
public void threadFinished(JMeterThread thread)
public void tellThreadsToStop()
JMeterThread.stop() - set stop flagJMeterThread.interrupt() - interrupt samplerThread.interrupt() - interrupt JVM thread
tellThreadsToStop in class AbstractThreadGrouppublic void stop()
JMeterThread.stop() - set stop flag
stop in class AbstractThreadGrouppublic int numberOfActiveThreads()
numberOfActiveThreads in class AbstractThreadGrouppublic boolean verifyThreadsStopped()
verifyThreadsStopped in class AbstractThreadGrouppublic void waitThreadsStopped()
waitThreadsStopped in class AbstractThreadGroup
|
Apache JMeter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||