|
Apache JMeter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.jmeter.samplers.SampleEvent
public class SampleEvent
Packages information regarding the target of a sample event, such as the result from that event and the thread group it ran in.
| Field Summary | |
|---|---|
static String |
HOSTNAME
|
static String |
SAMPLE_VARIABLES
The property "sample_variables" is used to define additional variables to be saved |
| Constructor Summary | |
|---|---|
SampleEvent()
Constructor used for Unit tests only. |
|
SampleEvent(SampleResult result,
String threadGroup)
Creates SampleEvent without saving any variables. |
|
SampleEvent(SampleResult result,
String threadGroup,
JMeterVariables jmvars)
Constructor used for normal samples, saves variable values if any are defined. |
|
SampleEvent(SampleResult result,
String threadGroup,
JMeterVariables jmvars,
boolean isTransactionSampleEvent)
|
|
SampleEvent(SampleResult result,
String threadGroup,
String hostname)
Only intended for use when loading results from a file. |
|
| Method Summary | |
|---|---|
String |
getHostname()
Get the name of the host for which this event was recorded |
SampleResult |
getResult()
Get the SampleResult associated with this event |
String |
getThreadGroup()
Get the name of the thread group for which this event was recorded |
static int |
getVarCount()
Get the number of defined variables |
static String |
getVarName(int i)
Get the nth variable name (zero-based) |
String |
getVarValue(int i)
Get the nth variable value (zero-based) |
static void |
initSampleVariables()
Set up the additional variable names to be saved from the value in the SAMPLE_VARIABLES property |
boolean |
isTransactionSampleEvent()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SAMPLE_VARIABLES
public static final String HOSTNAME
| Constructor Detail |
|---|
public SampleEvent()
null for the
associated SampleResult and the threadGroup-name.
public SampleEvent(SampleResult result,
String threadGroup)
Use by ProxyControl and StatisticalSampleSender.
result - The SampleResult to be associated with this eventthreadGroup - The name of the thread, the SampleResult was recorded
public SampleEvent(SampleResult result,
String threadGroup,
JMeterVariables jmvars)
result - The SampleResult to be associated with this eventthreadGroup - The name of the thread, the SampleResult was recordedjmvars - the JMeterVariables of the thread, the
SampleResult was recorded
public SampleEvent(SampleResult result,
String threadGroup,
String hostname)
result - The SampleResult to be associated with this eventthreadGroup - The name of the thread, the SampleResult was recordedhostname - The name of the host, for which the SampleResult was
recorded
public SampleEvent(SampleResult result,
String threadGroup,
JMeterVariables jmvars,
boolean isTransactionSampleEvent)
result - The SampleResult to be associated with this eventthreadGroup - The name of the thread, the SampleResult was recordedjmvars - the JMeterVariables of the thread, the
SampleResult was recordedisTransactionSampleEvent - Flag whether this event is an transaction sample event| Method Detail |
|---|
public static void initSampleVariables()
SAMPLE_VARIABLES property
public static int getVarCount()
public static String getVarName(int i)
i - specifies which variable name should be returned (zero-based)
public String getVarValue(int i)
i - specifies which variable value should be returned (zero-based)
JMeterError - when an invalid index i was givenpublic SampleResult getResult()
SampleResult associated with this event
SampleResultpublic String getThreadGroup()
public String getHostname()
public boolean isTransactionSampleEvent()
|
Apache JMeter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||