public class TimeStatisticImpl extends StatisticImpl implements TimeStatistic
DEFAULT_UNIT, DEFAULT_VALUE, NEWLINE| Constructor and Description |
|---|
TimeStatisticImpl(long counter,
long maximumTime,
long minimumTime,
long totalTime,
String name,
String unit,
String desc,
long startTime,
long sampleTime)
Deprecated.
use the other TimeStatisticImpl constructors.
Counter, maxtime, mintime, totaltime, starttime
last sampletime are automatically calculated
at the first measurement.
|
TimeStatisticImpl(String name) |
TimeStatisticImpl(String name,
String unit) |
TimeStatisticImpl(String name,
String unit,
String desc)
Constructs an immutable instance of TimeStatistic.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
Returns the number of times an operation was invoked
|
long |
getMaxTime()
Returns the maximum amount of time that it took for one invocation of an
operation, since measurement started.
|
long |
getMinTime()
Returns the minimum amount of time that it took for one invocation of an
operation, since measurement started.
|
long |
getTotalTime()
Returns the amount of time that it took for all invocations,
since measurement started.
|
String |
toString() |
getDescription, getLastSampleTime, getName, getStartTime, getUnit, setDescriptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getLastSampleTime, getName, getStartTime, getUnitpublic TimeStatisticImpl(String name)
public TimeStatisticImpl(String name, String unit, String desc)
name - The name of the statisticunit - The unit of measurement for this statisticdesc - A brief description of the statisticpublic TimeStatisticImpl(long counter,
long maximumTime,
long minimumTime,
long totalTime,
String name,
String unit,
String desc,
long startTime,
long sampleTime)
counter - The number of times an operation has been invoked since
measurement startedmaximumTime - The maximum time it took to complete one invocation
of an operation, since the measurement startedminimumTime - The minimum time it took to complete one invocation
of an opeation, since the measurement startedtotalTime - The total amount of time spent in all invocations,
over the duration of the measurementname - The name of the statisticunit - The unit of measurement for this statisticdesc - A brief description of the statisticstartTime - Time in milliseconds at which the measurement was startedsampleTime - Time at which the last measurement was done.public final String toString()
toString in class StatisticImplpublic long getCount()
getCount in interface TimeStatisticpublic long getMaxTime()
getMaxTime in interface TimeStatisticpublic long getMinTime()
getMinTime in interface TimeStatisticpublic long getTotalTime()
getTotalTime in interface TimeStatisticCopyright © 2014. All rights reserved.