ostore.network.patchwork
Class PatchworkStats
java.lang.Object
|
+--ostore.network.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.4 2003/03/24 00:13:13 geels Exp $
- Author:
- Jeremy Stribling
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
serialize
public void serialize(OutputBuffer buffer)
- Specified by ostore.util.QuickSerializable
- Specified by:
serialize
in interface QuickSerializable
- Following copied from interface:
ostore.util.QuickSerializable
- Parameters:
buffer
- the output buffer to add the object to
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