Package com.xceptance.xlt.api.engine
Class TransactionData
- java.lang.Object
-
- com.xceptance.xlt.api.engine.AbstractData
-
- com.xceptance.xlt.api.engine.TimerData
-
- com.xceptance.xlt.api.engine.TransactionData
-
- All Implemented Interfaces:
Data
public class TransactionData extends TimerData
The
TransactionDataclass holds any data measured for a transaction. Typically, a transaction spans exactly one execution of a certain test case, which itself comprises one or more actions.The values stored include not only the transaction's start and run time, but also an indicator whether or not the transaction was executed successfully and, if it has failed, what was the cause. Data gathered for the same type of transaction may be correlated via the name attribute.
Note that
TransactionDataobjects have a "T" as their type code.- See Also:
ActionData,RequestData,CustomData,EventData
-
-
Constructor Summary
Constructors Constructor Description TransactionData()Creates a new TransactionData object.TransactionData(java.lang.String name)Creates a new TransactionData object and gives it the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>addValues()Builds a list of string values that represents the state of this object.java.lang.StringgetDirectoryName()Returns the name of the directory where the result browser for this transaction is stored.java.lang.StringgetDumpDirectoryPath()Returns the path to the directory where dumped pages can be found if this transaction failed.java.lang.StringgetFailedActionName()Returns the name of the action that caused the transaction to fail.java.lang.StringgetFailureMessage()Returns the message of the throwable that caused this transaction to fail.java.lang.StringgetFailureStackTrace()Returns the stack trace of the throwable that caused this transaction to fail.protected intgetMinNoCSVElements()Returns the minimum number of elements in the CSV string.java.lang.StringgetTestUserNumber()Returns the number (or index, [0..N]) of the test user that produced this transaction data.protected voidparseRemainingValues(java.util.List<XltCharBuffer> values)Recreates the state of this object from an array of values.voidsetDirectoryName(java.lang.String directoryName)Sets the name of the directory where the result browser for this transaction is stored.voidsetFailedActionName(java.lang.String actionName)Sets the name of the action that caused the transaction to fail.voidsetFailureStackTrace(java.lang.String trace)Sets the stack trace of the throwable that caused this transaction to fail.voidsetFailureStackTrace(java.lang.Throwable throwable)Sets the stack trace attribute retrieved from the given throwable.voidsetTestUserNumber(java.lang.String testUserNumber)Sets the number (or index, [0..N]) of the test user that produced this transaction data.-
Methods inherited from class com.xceptance.xlt.api.engine.TimerData
getEndTime, getRunTime, hasFailed, setFailed, setRunTime, setRunTime
-
Methods inherited from class com.xceptance.xlt.api.engine.AbstractData
baseValuesFromCSV, getAgentName, getName, getTime, getTransactionName, getTypeCode, parseBaseValues, parseValues, remainingValuesFromCSV, setAgentName, setName, setTime, setTransactionName, toCSV
-
-
-
-
Constructor Detail
-
TransactionData
public TransactionData()
Creates a new TransactionData object.
-
TransactionData
public TransactionData(java.lang.String name)
Creates a new TransactionData object and gives it the specified name. Furthermore, the time attribute is set to the current time.- Parameters:
name- the transaction name
-
-
Method Detail
-
getDirectoryName
public java.lang.String getDirectoryName()
Returns the name of the directory where the result browser for this transaction is stored.- Returns:
- the directory name
-
setDirectoryName
public void setDirectoryName(java.lang.String directoryName)
Sets the name of the directory where the result browser for this transaction is stored.- Parameters:
directoryName- the directory name
-
getTestUserNumber
public java.lang.String getTestUserNumber()
Returns the number (or index, [0..N]) of the test user that produced this transaction data.- Returns:
- the test user number as a string
-
setTestUserNumber
public void setTestUserNumber(java.lang.String testUserNumber)
Sets the number (or index, [0..N]) of the test user that produced this transaction data.- Parameters:
testUserNumber- the test user number as a string
-
getFailedActionName
public java.lang.String getFailedActionName()
Returns the name of the action that caused the transaction to fail. Will be empty if the transaction was successful or the transaction failed outside of an action.- Returns:
- the action name
-
setFailedActionName
public void setFailedActionName(java.lang.String actionName)
Sets the name of the action that caused the transaction to fail.- Parameters:
actionName- the action name
-
getDumpDirectoryPath
public java.lang.String getDumpDirectoryPath()
Returns the path to the directory where dumped pages can be found if this transaction failed. The path is meant to be relative to the results directory of the respective load test. Typically, it looks like "ac1/TAuthor/1/output/1216803080255".- Returns:
- the dump directory path, or
nullif this transaction did not fail or no directory information was available
-
getFailureMessage
public java.lang.String getFailureMessage()
Returns the message of the throwable that caused this transaction to fail.- Returns:
- the message (may be null)
-
getFailureStackTrace
public java.lang.String getFailureStackTrace()
Returns the stack trace of the throwable that caused this transaction to fail.- Returns:
- the trace (may be null)
-
setFailureStackTrace
public void setFailureStackTrace(java.lang.String trace)
Sets the stack trace of the throwable that caused this transaction to fail.- Parameters:
trace- the trace
-
setFailureStackTrace
public void setFailureStackTrace(java.lang.Throwable throwable)
Sets the stack trace attribute retrieved from the given throwable.- Parameters:
throwable- the throwable
-
addValues
protected java.util.List<java.lang.String> addValues()
Builds a list of string values that represents the state of this object. Override this method in sub classes to add custom values and use the list created by the super class.
-
getMinNoCSVElements
protected int getMinNoCSVElements()
Returns the minimum number of elements in the CSV string.- Overrides:
getMinNoCSVElementsin classTimerData- Returns:
- minimum number of elements in the CSV string
-
parseRemainingValues
protected void parseRemainingValues(java.util.List<XltCharBuffer> values)
Recreates the state of this object from an array of values. Override this method in sub classes to restore custom values.- Overrides:
parseRemainingValuesin classTimerData- Parameters:
values- the list of values, must have at least the lengthAbstractData.getMinNoCSVElements()
-
-