Package com.xceptance.xlt.api.engine
Class TimerData
- java.lang.Object
-
- com.xceptance.xlt.api.engine.AbstractData
-
- com.xceptance.xlt.api.engine.TimerData
-
- All Implemented Interfaces:
Data
- Direct Known Subclasses:
ActionData
,CustomData
,PageLoadTimingData
,RequestData
,TransactionData
public abstract class TimerData extends AbstractData
TheTimerData
class is the super class for all timer-based data records.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getEndTime()
Returns the end time.int
getRunTime()
Returns the run time.boolean
hasFailed()
Indicates whether or not a failure had occurred.void
setFailed(boolean failed)
Sets whether or not a failure had occurred.void
setRemainingValues(java.util.List<XltCharBuffer> values)
Called by XLT during report creation to recreate the remaining object state from the passed string list.void
setRunTime(int runTime)
Sets the run time.void
setRunTime(long runTime)
Sets the run time.java.util.List<java.lang.String>
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.AbstractData
getAgentName, getName, getTime, getTransactionName, getTypeCode, setAgentName, setAllValues, setBaseValues, setName, setTime, setTransactionName
-
-
-
-
Constructor Detail
-
TimerData
public TimerData(char typeCode)
Creates a newTimerData
object and gives it the specified type code.- Parameters:
typeCode
- the type code
-
TimerData
public TimerData(java.lang.String name, char typeCode)
Creates a newTimerData
object and gives it the specified name and type code. Furthermore, the start time attribute is set to the current time.- Parameters:
name
- the request nametypeCode
- the type code
-
-
Method Detail
-
getEndTime
public long getEndTime()
Returns the end time. Calculated from start time and run time.- Returns:
- the end time
-
getRunTime
public int getRunTime()
Returns the run time.- Returns:
- the run time
-
hasFailed
public boolean hasFailed()
Indicates whether or not a failure had occurred.- Returns:
- the failure status
-
setFailed
public void setFailed(boolean failed)
Sets whether or not a failure had occurred.- Parameters:
failed
- the new status
-
setRunTime
public void setRunTime(long runTime)
Sets the run time. Convenience method for long values, but note that internally the value is cast to int.- Parameters:
runTime
- the runTime
-
setRunTime
public void setRunTime(int runTime)
Sets the run time.- Parameters:
runTime
- the runTime
-
toList
public java.util.List<java.lang.String> 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.
- Specified by:
toList
in interfaceData
- Overrides:
toList
in classAbstractData
- Returns:
- the list of values that form the state of this object
- See Also:
Data.setBaseValues(List)
,Data.setRemainingValues(List)
-
setRemainingValues
public void setRemainingValues(java.util.List<XltCharBuffer> values)
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.- Parameters:
values
- the string list to recreate the object state from- See Also:
Data.setBaseValues(List)
,Data.toList()
-
-