com.caucho.env.meter
Class AverageMeter

java.lang.Object
  extended by com.caucho.env.meter.AbstractMeter
      extended by com.caucho.env.meter.TotalMeter
          extended by com.caucho.env.meter.AverageMeter
All Implemented Interfaces:
AverageSensor, Meter

public final class AverageMeter
extends TotalMeter
implements AverageSensor


Constructor Summary
AverageMeter(java.lang.String name)
           
 
Method Summary
 void add(long value)
          Adds a data sample to the probe
 TotalMeter createCount(java.lang.String name)
           
 AbstractMeter createMax(java.lang.String name)
           
 AbstractMeter createSigma(java.lang.String name, int n)
           
 double getTotal()
          Return the total count
 double sample()
          Return the probe's next average.
 double sampleCount()
          Return the probe's next sample.
 double sampleMax()
          Return the probe's next sample.
 double sampleSigma(int n)
          Return the probe's next 2-sigma
 
Methods inherited from class com.caucho.env.meter.AbstractMeter
getName, peek, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AverageMeter

public AverageMeter(java.lang.String name)
Method Detail

createCount

public TotalMeter createCount(java.lang.String name)

createMax

public AbstractMeter createMax(java.lang.String name)

createSigma

public AbstractMeter createSigma(java.lang.String name,
                                 int n)

add

public final void add(long value)
Description copied from interface: AverageSensor
Adds a data sample to the probe

Specified by:
add in interface AverageSensor

sample

public final double sample()
Return the probe's next average.

Specified by:
sample in interface Meter
Specified by:
sample in class AbstractMeter

getTotal

public double getTotal()
Description copied from class: TotalMeter
Return the total count

Specified by:
getTotal in class TotalMeter

sampleCount

public final double sampleCount()
Return the probe's next sample.


sampleSigma

public final double sampleSigma(int n)
Return the probe's next 2-sigma


sampleMax

public final double sampleMax()
Return the probe's next sample.