public class SampleEvent
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HOSTNAME |
static java.lang.String |
SAMPLE_VARIABLES
The property "sample_variables" is used to define additional variables to be saved
|
Constructor and Description |
---|
SampleEvent()
Constructor used for Unit tests only.
|
SampleEvent(SampleResult result,
java.lang.String threadGroup)
Creates SampleEvent without saving any variables.
|
SampleEvent(SampleResult result,
java.lang.String threadGroup,
JMeterVariables jmvars)
Constructor used for normal samples, saves variable values if any are
defined.
|
SampleEvent(SampleResult result,
java.lang.String threadGroup,
JMeterVariables jmvars,
boolean isTransactionSampleEvent) |
SampleEvent(SampleResult result,
java.lang.String threadGroup,
java.lang.String hostname)
Only intended for use when loading results from a file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHostname()
Get the name of the host for which this event was recorded
|
SampleResult |
getResult()
Get the
SampleResult associated with this event |
java.lang.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 java.lang.String |
getVarName(int i)
Get the nth variable name (zero-based)
|
java.lang.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() |
public static final java.lang.String SAMPLE_VARIABLES
public static final java.lang.String HOSTNAME
public SampleEvent()
null
for the
associated SampleResult
and the threadGroup
-name.public SampleEvent(SampleResult result, java.lang.String threadGroup)
Use by ProxyControl
and StatisticalSampleSender
.
result
- The SampleResult to be associated with this eventthreadGroup
- The name of the thread, the SampleResult
was recordedpublic SampleEvent(SampleResult result, java.lang.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 recordedpublic SampleEvent(SampleResult result, java.lang.String threadGroup, java.lang.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
recordedpublic SampleEvent(SampleResult result, java.lang.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 eventpublic static void initSampleVariables()
SAMPLE_VARIABLES
propertypublic static int getVarCount()
public static java.lang.String getVarName(int i)
i
- specifies which variable name should be returned (zero-based)public java.lang.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 eventSampleResult
public java.lang.String getThreadGroup()
public java.lang.String getHostname()
public boolean isTransactionSampleEvent()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.