Apache JMeter

org.apache.jorphan.math
Class StatCalculator

java.lang.Object
  extended byorg.apache.jorphan.math.StatCalculator

public class StatCalculator
extends Object

This class serves as a way to calculate the median of a list of values. It is not threadsafe.


Constructor Summary
StatCalculator()
           
 
Method Summary
 void addAll(StatCalculator calc)
           
 void addBytes(long newValue)
           
 void addValue(double newValue)
           
 void addValue(float newValue)
           
 void addValue(int newValue)
           
 void addValue(long newValue)
           
 void addValue(Number val)
           
 void clear()
           
 int getCount()
           
 HashMap getDistribution()
          The method has a limit of 1% as the finest granularity.
 Number getMax()
           
 double getMean()
           
 Number getMedian()
           
 Number getMin()
           
 Number getPercentPoint(double percent)
          Get the value which %percent% of the values are less than.
 Number getPercentPoint(float percent)
          Get the value which %percent% of the values are less than.
 double getStandardDeviation()
           
 long getTotalBytes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatCalculator

public StatCalculator()
Method Detail

clear

public void clear()

addValue

public void addValue(long newValue)

addValue

public void addValue(int newValue)

addValue

public void addValue(float newValue)

addValue

public void addValue(double newValue)

addBytes

public void addBytes(long newValue)

addAll

public void addAll(StatCalculator calc)

getMedian

public Number getMedian()

getTotalBytes

public long getTotalBytes()

getPercentPoint

public Number getPercentPoint(float percent)
Get the value which %percent% of the values are less than. This works just like median (where median represents the 50% point). A typical desire is to see the 90% point - the value that 90% of the data points are below, the remaining 10% are above.

Parameters:
percent -
Returns:
number of values less than the percentage

getPercentPoint

public Number getPercentPoint(double percent)
Get the value which %percent% of the values are less than. This works just like median (where median represents the 50% point). A typical desire is to see the 90% point - the value that 90% of the data points are below, the remaining 10% are above.

Parameters:
percent -
Returns:
number of values less than the percentage

getDistribution

public HashMap getDistribution()
The method has a limit of 1% as the finest granularity. We do this to make sure we get a whole number for iterating.


getMean

public double getMean()

getStandardDeviation

public double getStandardDeviation()

getMin

public Number getMin()

getMax

public Number getMax()

getCount

public int getCount()

addValue

public void addValue(Number val)

Apache JMeter

Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.