|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.jmx.AbstractSimonMXBeanImpl
org.javasimon.jmx.StopwatchMXBeanImpl
public class StopwatchMXBeanImpl
MX Bean representing a particular Stopwatch. It is not created
by default when JMX is activated - it must be created explicitely.
JmxRegisterCallback can be used to automate this.
stopwatch is declared protected for this reason.
| Field Summary | |
|---|---|
protected Stopwatch |
stopwatch
Wrapped Stopwatch instance - protected for subclasses. |
| Constructor Summary | |
|---|---|
StopwatchMXBeanImpl(Stopwatch stopwatch)
Creates the MX bean for the provided Stopwatch. |
|
| Method Summary | |
|---|---|
void |
addTime(long ns)
Adds split time in nanoseconds to total time of the stopwatch. |
long |
getActive()
Returns current number of measured splits (concurrently running). |
long |
getCounter()
Returns usage count of the stopwatch. |
long |
getLast()
Returns value of the last added split - wheter it was added directly or with stop method. |
String |
getLastAsString()
Returns value of the last added split as formatted string. |
long |
getMax()
Returns maximal time split value in nanoseconds. |
long |
getMaxActive()
Returns peek value of active concurrent splits. |
long |
getMaxActiveTimestamp()
Retruns ms timestamp when the last peek of the active split count occured. |
long |
getMaxTimestamp()
Returns ms timestamp when the max value was measured. |
double |
getMean()
Returns mean value (average) of all measured values. |
long |
getMin()
Returns minimal time split value in nanoseconds. |
long |
getMinTimestamp()
Returns ms timestamp when the min value was measured. |
double |
getStandardDeviation()
Returns standard deviation for all measured values. |
long |
getTotal()
Returns total sum of all split times in nanoseconds. |
String |
getType()
Returns Simon type used as a property in the ObjectName. |
double |
getVariance()
Returns unbiased estimate of the population variance. |
double |
getVarianceN()
Returns variance value of all measured values (entire population). |
StopwatchSample |
sample()
Samples Simon values and returns them in a Java Bean derived from Sample interface. |
StopwatchSample |
sampleAndReset()
Samples Simon values and returns them in a Java Bean derived from Sample interface and resets the Simon. |
protected Simon |
simon()
Returns the wrapped Simon. |
| Methods inherited from class org.javasimon.jmx.AbstractSimonMXBeanImpl |
|---|
getFirstUsage, getFirstUsageAsString, getChildrenNames, getLastUsage, getLastUsageAsString, getName, getNote, getParentName, getState, isEnabled, reset, setNote, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.javasimon.jmx.SimonSuperMXBean |
|---|
getFirstUsage, getFirstUsageAsString, getChildrenNames, getLastUsage, getLastUsageAsString, getName, getNote, getParentName, getState, isEnabled, reset, setNote, setState |
| Field Detail |
|---|
protected Stopwatch stopwatch
Stopwatch instance - protected for subclasses.
| Constructor Detail |
|---|
public StopwatchMXBeanImpl(Stopwatch stopwatch)
stopwatch - wrapped Stopwatch| Method Detail |
|---|
public final void addTime(long ns)
StopwatchMXBean
addTime in interface StopwatchMXBeanns - split timeStopwatch.addTime(long)public long getTotal()
StopwatchMXBean
getTotal in interface StopwatchMXBeanStopwatch.getTotal()public final long getLast()
StopwatchMXBean
getLast in interface StopwatchMXBeanStopwatch.getLast()public final String getLastAsString()
StopwatchMXBean
getLastAsString in interface StopwatchMXBeanpublic long getCounter()
StopwatchMXBeanaddTime and
stop - that means that it's updated every time the next time split is added.
getCounter in interface StopwatchMXBeanStopwatch.getCounter()public long getMax()
StopwatchMXBean
getMax in interface StopwatchMXBeanStopwatch.getMax()public long getMin()
StopwatchMXBean
getMin in interface StopwatchMXBeanStopwatch.getMin()public long getMaxTimestamp()
StopwatchMXBean
getMaxTimestamp in interface StopwatchMXBeanStopwatch.getMaxTimestamp()public long getMinTimestamp()
StopwatchMXBean
getMinTimestamp in interface StopwatchMXBeanStopwatch.getMinTimestamp()public long getActive()
StopwatchMXBean
getActive in interface StopwatchMXBeanStopwatch.getActive()public long getMaxActive()
StopwatchMXBean
getMaxActive in interface StopwatchMXBeanStopwatch.getMaxActive()public long getMaxActiveTimestamp()
StopwatchMXBean
getMaxActiveTimestamp in interface StopwatchMXBeanStopwatch.getMaxActiveTimestamp()public double getMean()
StopwatchMXBean
getMean in interface StopwatchMXBeanStopwatch.getMean()public double getStandardDeviation()
StopwatchMXBean
getStandardDeviation in interface StopwatchMXBeanStopwatch.getStandardDeviation()public double getVariance()
StopwatchMXBean
getVariance in interface StopwatchMXBeanStopwatch.getVariance()public double getVarianceN()
StopwatchMXBean
getVarianceN in interface StopwatchMXBeanStopwatch.getVarianceN()public final StopwatchSample sample()
SimonSuperMXBean
sample in interface SimonSuperMXBeansample in interface StopwatchMXBeanpublic final StopwatchSample sampleAndReset()
SimonSuperMXBean
sampleAndReset in interface SimonSuperMXBeansampleAndReset in interface StopwatchMXBeanpublic final String getType()
SimonSuperMXBeanObjectName.
getType in interface SimonSuperMXBeanprotected final Simon simon()
AbstractSimonMXBeanImpl
simon in class AbstractSimonMXBeanImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||