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
TheTimerDataclass is the super class for all timer-based data records.
-
-
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.longgetEndTime()Returns the end time.protected intgetMinNoCSVElements()Returns the minimum number of elements in the CSV string.intgetRunTime()Returns the run time.booleanhasFailed()Indicates whether or not a failure had occurred.protected voidparseRemainingValues(java.util.List<XltCharBuffer> values)Recreates the state of this object from an array of values.voidsetFailed(boolean failed)Sets whether or not a failure had occurred.voidsetRunTime(int runTime)Sets the run time.voidsetRunTime(long runTime)Sets the run time.-
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
-
TimerData
public TimerData(char typeCode)
Creates a newTimerDataobject and gives it the specified type code.- Parameters:
typeCode- the type code
-
TimerData
public TimerData(java.lang.String name, char typeCode)Creates a newTimerDataobject 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
-
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.- Overrides:
addValuesin classAbstractData- Returns:
- the list of values
-
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.- Specified by:
parseRemainingValuesin classAbstractData- Parameters:
values- the list of values, must have at least the lengthAbstractData.getMinNoCSVElements()
-
getMinNoCSVElements
protected int getMinNoCSVElements()
Returns the minimum number of elements in the CSV string.- Overrides:
getMinNoCSVElementsin classAbstractData- Returns:
- minimum number of elements in the CSV string
-
-