Class TimeStatisticImpl
java.lang.Object
org.glassfish.external.statistics.impl.StatisticImpl
org.glassfish.external.statistics.impl.TimeStatisticImpl
- All Implemented Interfaces:
InvocationHandler
,Statistic
,TimeStatistic
public final class TimeStatisticImpl
extends StatisticImpl
implements TimeStatistic, InvocationHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private final long
private final long
private final long
private final long
private long
private long
private long
private final TimeStatistic
Fields inherited from class org.glassfish.external.statistics.impl.StatisticImpl
LAST_SAMPLE_TIME, NEWLINE, sampleTime, START_TIME, statMap, UNIT_COUNT, UNIT_MICROSECOND, UNIT_MILLISECOND, UNIT_NANOSECOND, UNIT_SECOND
-
Constructor Summary
ConstructorsConstructorDescriptionTimeStatisticImpl
(long counter, long maximumTime, long minimumTime, long totalTime, String name, String unit, String desc, long startTime, long sampleTime) -
Method Summary
Modifier and TypeMethodDescriptionlong
getCount()
Returns the number of times an operation was invokedlong
Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.long
Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.long
Returns the amount of time that it took for all invocations, since measurement started.void
incrementCount
(long current) void
reset()
final String
toString()
Methods inherited from class org.glassfish.external.statistics.impl.StatisticImpl
checkMethod, getDescription, getLastSampleTime, getName, getStartTime, getUnit, isValidString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.glassfish.external.statistics.Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
-
Field Details
-
count
private long count -
maxTime
private long maxTime -
minTime
private long minTime -
totTime
private long totTime -
initCount
private final long initCount -
initMaxTime
private final long initMaxTime -
initMinTime
private final long initMinTime -
initTotTime
private final long initTotTime -
ts
-
-
Constructor Details
-
TimeStatisticImpl
-
-
Method Details
-
toString
- Overrides:
toString
in classStatisticImpl
-
getStatistic
-
getStaticAsMap
- Overrides:
getStaticAsMap
in classStatisticImpl
-
incrementCount
public void incrementCount(long current) -
getCount
public long getCount()Returns the number of times an operation was invoked- Specified by:
getCount
in interfaceTimeStatistic
-
getMaxTime
public long getMaxTime()Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.- Specified by:
getMaxTime
in interfaceTimeStatistic
-
getMinTime
public long getMinTime()Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.- Specified by:
getMinTime
in interfaceTimeStatistic
-
getTotalTime
public long getTotalTime()Returns the amount of time that it took for all invocations, since measurement started.- Specified by:
getTotalTime
in interfaceTimeStatistic
-
reset
public void reset()- Overrides:
reset
in classStatisticImpl
-
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-