org.apache.jmeter.visualizers
Class SamplingStatCalculator
public class SamplingStatCalculator
Aggegate sample data container. Just instantiate a new instance of this
class, and then call
addSample(SampleResult)
a few times, and pull
the stats out with whatever methods you prefer.
SamplingStatCalculator
public SamplingStatCalculator()
SamplingStatCalculator
public SamplingStatCalculator(String label)
Use this constructor.
clear
public void clear()
Clear the counters (useful for differential stats)
getAvgPageBytes
public double getAvgPageBytes()
calculates the average page size, which means divide the bytes by number
of samples.
- average page size in bytes
getBytesPerSecond
public double getBytesPerSecond()
Throughput in bytes / second
- throughput in bytes/second
getCount
public int getCount()
getCurrentSample
public Sample getCurrentSample()
getDistribution
public HashMap getDistribution()
getElapsed
public long getElapsed()
Get the elapsed time for the samples
- how long the samples took
getErrorCount
public long getErrorCount()
getErrorPercentage
public double getErrorPercentage()
Returns the raw double value of the percentage of samples with errors
that were recorded. (Between 0.0 and 1.0)
- the raw double value of the percentage of samples with errors
that were recorded.
getKBPerSecond
public double getKBPerSecond()
Throughput in kilobytes / second
- Throughput in kilobytes / second
getLabel
public String getLabel()
getMax
public Number getMax()
getMaxThroughput
public double getMaxThroughput()
- Returns the maxThroughput.
getMean
public double getMean()
getMeanAsNumber
public Number getMeanAsNumber()
getMedian
public Number getMedian()
getMin
public Number getMin()
getPageSize
public double getPageSize()
use getBytesPerSecond() instead
Should calculate the average page size, which means divide the bytes by number
of samples - actually calculates the throughput in bytes / second
getPercentPoint
public Number getPercentPoint(double percent)
getPercentPoint
public Number getPercentPoint(float percent)
getRate
public double getRate()
Returns the throughput associated to this sampler in requests per second.
May be slightly skewed because it takes the timestamps of the first and
last samples as the total time passed, and the test may actually have
started before that start time and ended after that end time.
getSample
public Sample getSample(int index)
getSamples
public List getSamples()
getStandardDeviation
public double getStandardDeviation()
toString
public String toString()
For debugging purposes, only.
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.