| |
|
| java.lang.Object org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient org.apache.jmeter.protocol.java.test.SleepTest
SleepTest | public class SleepTest extends AbstractJavaSamplerClient implements Serializable(Code) | | The SleepTest class is a simple example class for a JMeter
Java protocol client. The class implements the JavaSamplerClient
interface.
During each sample, this client will sleep for some amount of time. The
amount of time to sleep is determined from the two parameters SleepTime and
SleepMask using the formula:
totalSleepTime = SleepTime + (System.currentTimeMillis() % SleepMask)
Thus, the SleepMask provides a way to add a random component to the sleep
time.
author: Jeremy Arnold version: $Revision: 493789 $ |
Field Summary | |
final public static long | DEFAULT_SLEEP_MASK The default value of the SleepMask parameter. | final public static long | DEFAULT_SLEEP_TIME The default value of the SleepTime parameter, in milliseconds. |
Constructor Summary | |
public | SleepTest() Default constructor for SleepTest . |
DEFAULT_SLEEP_MASK | final public static long DEFAULT_SLEEP_MASK(Code) | | The default value of the SleepMask parameter.
|
DEFAULT_SLEEP_TIME | final public static long DEFAULT_SLEEP_TIME(Code) | | The default value of the SleepTime parameter, in milliseconds.
|
SleepTest | public SleepTest()(Code) | | Default constructor for SleepTest .
The Java Sampler uses the default constructor to instantiate an instance
of the client class.
|
getDefaultParameters | public Arguments getDefaultParameters()(Code) | | Provide a list of parameters which this test supports. Any parameter
names and associated values returned by this method will appear in the
GUI by default so the user doesn't have to remember the exact names. The
user can add other parameters which are not listed here. If this method
returns null then no parameters will be listed. If the value for some
parameter is null then that parameter will be listed in the GUI with an
empty value.
a specification of the parameters used by this test which shouldbe listed in the GUI, or null if no parameters should be listed. |
setupTest | public void setupTest(JavaSamplerContext context)(Code) | | Do any initialization required by this client. In this case,
initialization consists of getting the values of the SleepTime and
SleepMask parameters. It is generally recommended to do any
initialization such as getting parameter values in the setupTest method
rather than the runTest method in order to add as little overhead as
possible to the test.
Parameters: context - the context to run with. This provides access toinitialization parameters. |
teardownTest | public void teardownTest(JavaSamplerContext context)(Code) | | Do any clean-up required by this test. In this case no clean-up is
necessary, but some messages are logged for debugging purposes.
Parameters: context - the context to run with. This provides access toinitialization parameters. |
|
|
|