Class TimerData

    • Field Summary

      • Fields inherited from interface com.xceptance.xlt.api.engine.Data

        DELIMITER
    • Constructor Summary

      Constructors 
      Constructor Description
      TimerData​(java.lang.String typeCode)
      Creates a new TimerData object and gives it the specified type code.
      TimerData​(java.lang.String name, java.lang.String typeCode)
      Creates a new TimerData object and gives it the specified name and type code.
    • Constructor Detail

      • TimerData

        public TimerData​(java.lang.String typeCode)
        Creates a new TimerData object and gives it the specified type code.
        Parameters:
        typeCode - the type code
      • TimerData

        public TimerData​(java.lang.String name,
                         java.lang.String typeCode)
        Creates a new TimerData 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 name
        typeCode - 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 long 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()
        Sets the run time to be the difference between the current time and the current value of the start time attribute.
      • setRunTime

        public void setRunTime​(long 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:
        addValues in class AbstractData
        Returns:
        the list of values
      • parseValues

        protected void parseValues​(java.lang.String[] values)
        Recreates the state of this object from an array of string values. Override this method in sub classes to restore custom values, but do not forget to call the super class first.
        Overrides:
        parseValues in class AbstractData
        Parameters:
        values - the list of values, must have at least the length AbstractData.getMinNoCSVElements()
      • getMinNoCSVElements

        protected int getMinNoCSVElements()
        Returns the minimum number of elements in the CSV string.
        Overrides:
        getMinNoCSVElements in class AbstractData
        Returns:
        minimum number of elements in the CSV string