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
The TransactionData
class 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 TransactionData
objects have a "T" as their type code.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TransactionData object.TransactionData
(String name) Creates a new TransactionData object and gives it the specified name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the directory where the result browser for this transaction is stored.Returns the path to the directory where dumped pages can be found if this transaction failed.Returns the name of the action that caused the transaction to fail.Returns the message of the throwable that caused this transaction to fail.Returns the stack trace of the throwable that caused this transaction to fail.Returns the number (or index, [0..N]) of the test user that produced this transaction data.void
setDirectoryName
(String directoryName) Sets the name of the directory where the result browser for this transaction is stored.void
setFailedActionName
(String actionName) Sets the name of the action that caused the transaction to fail.void
setFailureStackTrace
(String trace) Sets the stack trace of the throwable that caused this transaction to fail.void
setFailureStackTrace
(Throwable throwable) Sets the stack trace attribute retrieved from the given throwable.void
setRemainingValues
(List<XltCharBuffer> values) Called by XLT during report creation to recreate the remaining object state from the passed string list.void
setTestUserNumber
(String testUserNumber) Sets the number (or index, [0..N]) of the test user that produced this transaction data.toList()
Called by XLT during a load test to return the full state of the object as a list of strings.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
getAgentName, getName, getTime, getTransactionName, getTypeCode, setAgentName, setAllValues, setBaseValues, setName, setTime, setTransactionName
-
Constructor Details
-
TransactionData
public TransactionData()Creates a new TransactionData object. -
TransactionData
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 Details
-
getDirectoryName
Returns the name of the directory where the result browser for this transaction is stored.- Returns:
- the directory name
-
setDirectoryName
Sets the name of the directory where the result browser for this transaction is stored.- Parameters:
directoryName
- the directory name
-
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
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
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
Sets the name of the action that caused the transaction to fail.- Parameters:
actionName
- the action name
-
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
null
if this transaction did not fail or no directory information was available
-
getFailureMessage
Returns the message of the throwable that caused this transaction to fail.- Returns:
- the message (may be null)
-
getFailureStackTrace
Returns the stack trace of the throwable that caused this transaction to fail.- Returns:
- the trace (may be null)
-
setFailureStackTrace
Sets the stack trace of the throwable that caused this transaction to fail.- Parameters:
trace
- the trace
-
setFailureStackTrace
Sets the stack trace attribute retrieved from the given throwable.- Parameters:
throwable
- the throwable
-
toList
Called by XLT during a load test to return the full state of the object as a list of strings. The first three entries have to be, in this order, the type code, the name, and the timestamp. All remaining entries and their order are specific to the concrete implementation class.Override this method in sub classes by calling the super method and adding custom values to the list it returns.
-
setRemainingValues
Called by XLT during report creation to recreate the remaining object state from the passed string list. The base values have already been initialized by callingData.setBaseValues(List)
with the same list of values. Splitting the process of recreating the full object state into two methods is purely for performance reasons as the second step is not always needed.- Specified by:
setRemainingValues
in interfaceData
- Overrides:
setRemainingValues
in classTimerData
- Parameters:
values
- the string list to recreate the object state from- See Also:
-