org.jmonit.features
Class Statistics

java.lang.Object
  extended by org.jmonit.features.AbstractFeature<Statistics>
      extended by org.jmonit.features.Statistics
All Implemented Interfaces:
MonitoringEventListener, Visitable, Plugin<Statistics>

public class Statistics
extends AbstractFeature<Statistics>
implements Visitable

Computes some statistics from monitored datas.

Author:
Nicolas De Loof

Field Summary
static Factory<Statistics> FACTORY
           
 
Constructor Summary
Statistics()
           
 
Method Summary
 void accept(Visitor visitor)
          Entry point for an object that accepts visitors.
 void added(long value)
          
 void clear()
           
 Statistics getFeature()
          A feature is identified by the class it exposes to the monitored application.
 long getHits()
           
 long getMax()
           
 double getMean()
           
 long getMin()
           
 double getStandardDeviation()
          Compute the standard deviation (measures the dispersion of values around the average value) = sqrt( variance )
 long getTotal()
           
 double getVariance()
          Computes the http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance unbiased variance.
 void onMonitoringEvent(MonitoringEvent event)
          A monitoring event occured and has been dispatched on the bus
 java.lang.String toString()
          
 
Methods inherited from class org.jmonit.features.AbstractFeature
fireMonitoringEvent, getFeature, setMonitor, setMonitoringEventBus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FACTORY

public static final Factory<Statistics> FACTORY
Constructor Detail

Statistics

public Statistics()
Method Detail

onMonitoringEvent

public void onMonitoringEvent(MonitoringEvent event)
A monitoring event occured and has been dispatched on the bus

Specified by:
onMonitoringEvent in interface MonitoringEventListener
See Also:
MonitoringEventListener.onMonitoringEvent(org.jmonit.events.MonitoringEvent)

added

public void added(long value)


getHits

public long getHits()
Returns:
the hits

getMax

public long getMax()
Returns:
the max

getMean

public double getMean()

getMin

public long getMin()
Returns:
the min

getStandardDeviation

public double getStandardDeviation()
Compute the standard deviation (measures the dispersion of values around the average value) = sqrt( variance )

Returns:
the standard deviation

getTotal

public long getTotal()
Returns:
the total

getVariance

public double getVariance()
Computes the http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance unbiased variance.

Returns:
the variance

clear

public void clear()

getFeature

public Statistics getFeature()
A feature is identified by the class it exposes to the monitored application.

Specified by:
getFeature in interface Plugin<Statistics>
Returns:
the public API of this feature
See Also:
Plugin.getFeature()

accept

public void accept(Visitor visitor)
Entry point for an object that accepts visitors.

Specified by:
accept in interface Visitable
See Also:
Visitable.accept(org.jmonit.reporting.Visitor)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2007 Nicolas De Loof. All Rights Reserved.