Class StopwatchResult
- java.lang.Object
-
- com.anaptecs.jeaf.tools.api.performance.StopwatchResult
-
public class StopwatchResult extends java.lang.ObjectClass 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 longgetDuration()Method returns the Duration of the measurement.longgetTransactions()Method returns the number of transactions that were executed during the time when a stopwatch was active.java.lang.DoublegetTransactionsPerSecond()Method returns the transactions per second that were processed during the measurement.TimePrecisiongetUnit()Method returns the time precision of the measurement and thus also the unit of theduration.
-
-
-
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 attributeunit.- 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 theduration.- Returns:
TimePrecisionTime 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:
DoubleTransactions per second. The method may return null in case that the stop watch did not know the amount of runs during the measurement.
-
-