tapestry.patchwork
Class PatchworkStats

java.lang.Object
  |
  +--tapestry.patchwork.PatchworkStats
All Implemented Interfaces:
QuickSerializable

public class PatchworkStats
extends Object
implements QuickSerializable

The PatchworkStats data structure contains info describing thevalues of some statistic, both overall and current (over the last measurement window).

Version:
$Id: PatchworkStats.java,v 1.1.1.1 2004/03/26 19:57:10 hweather Exp $
Author:
Jeremy Stribling

Nested Class Summary
static class PatchworkStats.StatDelta
           
 
Constructor Summary
PatchworkStats(InputBuffer buffer)
          Specified by ostore.util.QuickSerializable
PatchworkStats(NodeId node_id, byte type)
           
PatchworkStats(NodeId node_id, byte type, long start_value)
           
 
Method Summary
protected  void add(PatchworkStats.StatDelta delta)
           
protected  void addStat(long value)
           
 long getCount()
          Returns the number of samples used in the last recalculation, to obtain the "current" values.
 double getCurrentGeometricMean()
           
 long getCurrentMax()
           
 double getCurrentMean()
           
 long getCurrentMedian()
           
 long getCurrentMin()
           
 double getOverallGeometricMean()
           
 long getOverallMax()
           
 double getOverallMean()
           
 long getOverallMin()
           
protected  PatchworkStats.StatDelta recalculate(double alpha, double threshold)
           
 void serialize(OutputBuffer buffer)
          Specified by ostore.util.QuickSerializable
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatchworkStats

public PatchworkStats(NodeId node_id,
                      byte type)

PatchworkStats

public PatchworkStats(NodeId node_id,
                      byte type,
                      long start_value)

PatchworkStats

public PatchworkStats(InputBuffer buffer)
               throws QSException
Specified by ostore.util.QuickSerializable

Method Detail

serialize

public void serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable

Specified by:
serialize in interface QuickSerializable

add

protected void add(PatchworkStats.StatDelta delta)

addStat

protected void addStat(long value)

getOverallMin

public long getOverallMin()

getOverallMax

public long getOverallMax()

getOverallMean

public double getOverallMean()

getOverallGeometricMean

public double getOverallGeometricMean()

getCurrentMin

public long getCurrentMin()

getCurrentMax

public long getCurrentMax()

getCurrentMedian

public long getCurrentMedian()

getCurrentMean

public double getCurrentMean()

getCurrentGeometricMean

public double getCurrentGeometricMean()

getCount

public long getCount()
Returns the number of samples used in the last recalculation, to obtain the "current" values.


recalculate

protected PatchworkStats.StatDelta recalculate(double alpha,
                                               double threshold)

toString

public String toString()
Overrides:
toString in class Object