Package org.apache.activemq.management
Class TimeStatisticImpl
java.lang.Object
org.apache.activemq.management.StatisticImpl
org.apache.activemq.management.TimeStatisticImpl
- All Implemented Interfaces:
Resettable,Statistic
A time statistic implementation
-
Field Summary
Fields inherited from class org.apache.activemq.management.StatisticImpl
enabled -
Constructor Summary
ConstructorsConstructorDescriptionTimeStatisticImpl(String name, String description) TimeStatisticImpl(String name, String unit, String description) TimeStatisticImpl(TimeStatisticImpl parent, String name, String description) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTime(long time) protected voidappendFieldDescription(StringBuffer buffer) doubledoubledoubledoublelonggetCount()longlonglongvoidreset()Reset the statisticvoidsetParent(TimeStatisticImpl parent) Methods inherited from class org.apache.activemq.management.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, isDoReset, isEnabled, setDoReset, setEnabled, toString, updateSampleTime
-
Constructor Details
-
TimeStatisticImpl
-
TimeStatisticImpl
-
TimeStatisticImpl
-
-
Method Details
-
reset
public void reset()Description copied from interface:ResettableReset the statistic- Specified by:
resetin interfaceResettable- Overrides:
resetin classStatisticImpl
-
getCount
public long getCount() -
addTime
public void addTime(long time) -
getMaxTime
public long getMaxTime()- Returns:
- the maximum time of any step
-
getMinTime
public long getMinTime()- Returns:
- the minimum time of any step
-
getTotalTime
public long getTotalTime()- Returns:
- the total time of all the steps added together
-
getAverageTime
public double getAverageTime()- Returns:
- the average time calculated by dividing the total time by the number of counts
-
getAverageTimeExcludingMinMax
public double getAverageTimeExcludingMinMax()- Returns:
- the average time calculated by dividing the total time by the number of counts but excluding the minimum and maximum times.
-
getAveragePerSecond
public double getAveragePerSecond()- Returns:
- the average number of steps per second
-
getAveragePerSecondExcludingMinMax
public double getAveragePerSecondExcludingMinMax()- Returns:
- the average number of steps per second excluding the min & max values
-
getParent
-
setParent
-
appendFieldDescription
- Overrides:
appendFieldDescriptionin classStatisticImpl
-