public class Sample
extends java.lang.Object
Getters with a string parameter are implemented for convenience but should be avoided as they are inefficient
Constructor and Description |
---|
Sample(long row,
SampleMetadata metadata,
java.lang.String... data)
Build a sample from a string array
|
Modifier and Type | Method and Description |
---|---|
int |
getAllThreads()
Gets the overall number of threads.
|
long |
getConnectTime()
Gets the connect time stored in the sample.
|
<T> T |
getData(java.lang.Class<T> clazz,
int index,
java.lang.String fieldName)
Gets the data of the column matching the specified rank and converts it
to an alternative type.
|
<T> T |
getData(java.lang.Class<T> clazz,
java.lang.String name)
Gets the data of the column matching the specified name and converts it
to an alternative type.
|
java.lang.String |
getData(int index)
Gets the data stored in the column with the specified rank.
|
java.lang.String |
getData(java.lang.String name)
Gets the data stored in the column with the specified name.
|
long |
getElapsedTime()
Gets the elapsed time stored in the sample.
|
long |
getEndTime()
Gets the end time of the sample.
|
java.lang.String |
getFailureMessage()
Gets the failure message stored in the sample.
|
int |
getGroupThreads()
Gets the number of threads in the group of this sample.
|
long |
getLatency()
Gets the latency stored in the sample.
|
java.lang.String |
getName()
Gets the name stored in the sample.
|
long |
getReceivedBytes()
Gets the number of received bytes stored in the sample.
|
java.lang.String |
getResponseCode()
Gets the response code stored in the sample.
|
java.lang.String |
getResponseMessage()
Gets the response message stored in the sample.
|
long |
getSampleRow() |
long |
getSentBytes()
Gets the number of sent bytes stored in the sample.
|
long |
getStartTime()
Gets the start time of the sample.
|
boolean |
getSuccess()
Gets the success status stored in the sample.
|
java.lang.String |
getThreadName()
Gets the thread name stored in the sample.
|
long |
getTimestamp()
Gets the time stamp stored in the sample.
|
boolean |
isController()
Checks if this sample is a controller.
|
boolean |
isEmptyController()
Checks if this sample is an empty controller.
|
java.lang.String |
toString() |
public Sample(long row, SampleMetadata metadata, java.lang.String... data)
row
- the row number in the CSV source from which this sample is
builtmetadata
- The sample metadata (contains column names)data
- The sample data as a string arraypublic long getSampleRow()
public java.lang.String getData(int index)
index
- the rank of the columnpublic java.lang.String getData(java.lang.String name)
name
- the name of the columnpublic <T> T getData(java.lang.Class<T> clazz, int index, java.lang.String fieldName)
T
- type of data to be fetchedclazz
- the target class of the dataindex
- the rank of the columnfieldName
- Field namepublic <T> T getData(java.lang.Class<T> clazz, java.lang.String name)
T
- type of data to be fetchedclazz
- the target class of the dataname
- the name of the columnpublic java.lang.String toString()
toString
in class java.lang.Object
public long getTimestamp()
public long getElapsedTime()
public long getStartTime()
Gets the start time of the sample.
Start time depends on sampleresult.timestamp.start property :
public long getEndTime()
Gets the end time of the sample.
End time depends on jmeter.timestamp.start property :
public java.lang.String getResponseCode()
public java.lang.String getFailureMessage()
public java.lang.String getName()
public java.lang.String getResponseMessage()
public long getLatency()
public long getConnectTime()
public boolean getSuccess()
public long getReceivedBytes()
public long getSentBytes()
public int getGroupThreads()
public int getAllThreads()
public java.lang.String getThreadName()
public boolean isController()
true
, if this sample is a controller; otherwise
false
public boolean isEmptyController()
true
, if this sample is a controller; otherwise
false
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.