Class StopwatchResult


  • public class StopwatchResult
    extends java.lang.Object
    Class represents the result of a stop watch run.
    Author:
    JEAF Development Team
    • Constructor Summary

      Constructors 
      Constructor Description
      StopwatchResult​(long pDuration, TimePrecision pUnit, long pTransactions)
      Initialize object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDuration()
      Method returns the Duration of the measurement.
      long getTransactions()
      Method returns the number of transactions that were executed during the time when a stopwatch was active.
      java.lang.Double getTransactionsPerSecond()
      Method returns the transactions per second that were processed during the measurement.
      TimePrecision getUnit()
      Method returns the time precision of the measurement and thus also the unit of the duration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StopwatchResult

        public StopwatchResult​(long pDuration,
                               TimePrecision pUnit,
                               long pTransactions)
        Initialize object
        Parameters:
        pDuration - Duration of the measurement.
        pUnit - Time precision (unit) of the measurement. The parameter must not be null.
        pTPS - Transactions per second that were processed.
    • Method Detail

      • getDuration

        public long getDuration()
        Method returns the Duration of the measurement. The unit of the duration is defined by attribute unit.
        Returns:
        long Duration of the stop watch run.
      • getUnit

        public TimePrecision getUnit()
        Method returns the time precision of the measurement and thus also the unit of the duration.
        Returns:
        TimePrecision Time precision of the measurement. The method never returns null.
      • getTransactions

        public long getTransactions()
        Method returns the number of transactions that were executed during the time when a stopwatch was active.
        Returns:
        long Number of transactions.
      • getTransactionsPerSecond

        public java.lang.Double getTransactionsPerSecond()
        Method returns the transactions per second that were processed during the measurement.
        Returns:
        Double Transactions per second. The method may return null in case that the stop watch did not know the amount of runs during the measurement.