ostore.util
Class StatRecorder
java.lang.Object
|
+--ostore.util.StatRecorder
- All Implemented Interfaces:
- QuickSerializable
- public class StatRecorder
- extends Object
- implements QuickSerializable
The StatRecorder
class is a utility for recording
and analyzing a number of samples for a measurement.
- Version:
- $Id: StatRecorder.java,v 1.7 2003/01/24 21:01:39 strib Exp $
- Author:
- Patrick R. Eaton
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatRecorder
public StatRecorder(String name)
StatRecorder
public StatRecorder(String name,
String tag)
StatRecorder
public StatRecorder(InputBuffer buffer)
serialize
public void serialize(OutputBuffer buffer)
- Description copied from interface:
QuickSerializable
- Add the object to the
buffer
.
- Specified by:
serialize
in interface QuickSerializable
- Parameters:
buffer
- the output buffer to add the object to
reset
public void reset()
add
public void add(StatRecorder other)
add
public void add(long sample)
add
public void add(long sample,
long count)
getNumSamples
public long getNumSamples()
getPercentile
public long getPercentile(double percentile)
getMedian
public long getMedian()
getMin
public long getMin()
getMax
public long getMax()
getMean
public double getMean()
getGeometricMean
public double getGeometricMean()
getStddev
public double getStddev()
getHistogram
public String getHistogram()
getHistogram
public String getHistogram(int bucket_size)