public class SampleEvent extends Object implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
static String | 
HOSTNAME  | 
static 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,
           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. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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()  | 
public static final String SAMPLE_VARIABLES
public static final String HOSTNAME
public SampleEvent()
null for the
 associated SampleResult and the threadGroup-name.public SampleEvent(SampleResult result, String threadGroup)
result - The SampleResult to be associated with this eventthreadGroup - The name of the thread, the SampleResult was recordedpublic 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 recordedpublic 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
            recordedpublic 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 eventpublic static void initSampleVariables()
SAMPLE_VARIABLES propertypublic 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 eventSampleResultpublic String getThreadGroup()
public String getHostname()
public boolean isTransactionSampleEvent()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.