org.javasimon.jmx
Interface StopwatchMXBean

All Superinterfaces:
SimonSuperMXBean
All Known Implementing Classes:
StopwatchMXBeanImpl

public interface StopwatchMXBean
extends SimonSuperMXBean

Interface for 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.

Author:
Richard "Virgo" Richter

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.
 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.
 
Methods inherited from interface org.javasimon.jmx.SimonSuperMXBean
getFirstUsage, getFirstUsageAsString, getChildrenNames, getLastUsage, getLastUsageAsString, getName, getNote, getParentName, getState, getType, isEnabled, reset, setNote, setState
 

Method Detail

addTime

void addTime(long ns)
Adds split time in nanoseconds to total time of the stopwatch.

Parameters:
ns - split time
See Also:
Stopwatch.addTime(long)

getTotal

long getTotal()
Returns total sum of all split times in nanoseconds.

Returns:
total time of the stopwatch in nanoseconds
Since:
3.3
See Also:
Stopwatch.getTotal()

getLast

long getLast()
Returns value of the last added split - wheter it was added directly or with stop method.

Returns:
value of the last added split
See Also:
Stopwatch.getLast()

getLastAsString

String getLastAsString()
Returns value of the last added split as formatted string.

Returns:
value of the last added split as string

getCounter

long getCounter()
Returns usage count of the stopwatch. Counter is increased by addTime and stop - that means that it's updated every time the next time split is added.

Returns:
count of time splits
Since:
3.3
See Also:
Stopwatch.getCounter()

getMax

long getMax()
Returns maximal time split value in nanoseconds.

Returns:
maximal time split in nanoseconds
Since:
3.3
See Also:
Stopwatch.getMax()

getMin

long getMin()
Returns minimal time split value in nanoseconds.

Returns:
minimal time split in nanoseconds
Since:
3.3
See Also:
Stopwatch.getMin()

getMaxTimestamp

long getMaxTimestamp()
Returns ms timestamp when the max value was measured.

Returns:
ms timestamp of the max value measurement
Since:
3.3
See Also:
Stopwatch.getMaxTimestamp()

getMinTimestamp

long getMinTimestamp()
Returns ms timestamp when the min value was measured.

Returns:
ms timestamp of the min value measurement
Since:
3.3
See Also:
Stopwatch.getMinTimestamp()

getActive

long getActive()
Returns current number of measured splits (concurrently running).

Returns:
current number of active splits
Since:
3.3
See Also:
Stopwatch.getActive()

getMaxActive

long getMaxActive()
Returns peek value of active concurrent splits.

Returns:
maximum reached value of active splits
Since:
3.3
See Also:
Stopwatch.getMaxActive()

getMaxActiveTimestamp

long getMaxActiveTimestamp()
Retruns ms timestamp when the last peek of the active split count occured.

Returns:
ms timestamp of the last peek of the active split count
Since:
3.3
See Also:
Stopwatch.getMaxActiveTimestamp()

getMean

double getMean()
Returns mean value (average) of all measured values.

Returns:
mean value
Since:
3.3
See Also:
Stopwatch.getMean()

getStandardDeviation

double getStandardDeviation()
Returns standard deviation for all measured values.

Returns:
standard deviation
Since:
3.3
See Also:
Stopwatch.getStandardDeviation()

getVariance

double getVariance()
Returns unbiased estimate of the population variance.

Returns:
unbiased estimated variance
Since:
3.3
See Also:
Stopwatch.getVariance()

getVarianceN

double getVarianceN()
Returns variance value of all measured values (entire population).

Returns:
entire population variance
Since:
3.3
See Also:
Stopwatch.getVarianceN()

sample

StopwatchSample sample()
Description copied from interface: SimonSuperMXBean
Samples Simon values and returns them in a Java Bean derived from Sample interface.

Specified by:
sample in interface SimonSuperMXBean
Returns:
sample containing all Simon values

sampleAndReset

StopwatchSample sampleAndReset()
Description copied from interface: SimonSuperMXBean
Samples Simon values and returns them in a Java Bean derived from Sample interface and resets the Simon. Operation is synchronized to assure atomicity.

Specified by:
sampleAndReset in interface SimonSuperMXBean
Returns:
sample containing all Simon values


Copyright © 2013. All Rights Reserved.