public class SamplingStatCalculator extends Object
addSample(SampleResult)
a few times, and pull
the stats out with whatever methods you prefer.Constructor and Description |
---|
SamplingStatCalculator() |
SamplingStatCalculator(String label) |
Modifier and Type | Method and Description |
---|---|
Sample |
addSample(SampleResult res)
Records a sample.
|
void |
clear()
Clear the counters (useful for differential stats)
|
double |
getAvgPageBytes()
calculates the average page size, which means divide the bytes by number
of samples.
|
double |
getBytesPerSecond()
Throughput in bytes / second
|
long |
getCount() |
Sample |
getCurrentSample() |
Map<Number,Number[]> |
getDistribution() |
long |
getElapsed()
Get the elapsed time for the samples
|
long |
getErrorCount() |
double |
getErrorPercentage()
Returns the raw double value of the percentage of samples with errors
that were recorded.
|
double |
getKBPerSecond()
Throughput in kilobytes / second
|
String |
getLabel() |
Number |
getMax() |
double |
getMaxThroughput() |
double |
getMean() |
Number |
getMeanAsNumber() |
Number |
getMedian() |
Number |
getMin() |
Number |
getPercentPoint(double percent) |
Number |
getPercentPoint(float percent) |
double |
getRate()
Returns the throughput associated to this sampler in requests per second.
|
double |
getSentBytesPerSecond()
Sent Throughput in bytes / second
|
double |
getSentKBPerSecond()
Sent Throughput in kilobytes / second
|
double |
getStandardDeviation() |
String |
toString() |
public SamplingStatCalculator()
public SamplingStatCalculator(String label)
public void clear()
public Sample getCurrentSample()
public long getElapsed()
public double getRate()
public double getBytesPerSecond()
public double getKBPerSecond()
public double getSentBytesPerSecond()
public double getSentKBPerSecond()
public double getAvgPageBytes()
public String getLabel()
public Sample addSample(SampleResult res)
res
- the sample to recordpublic double getErrorPercentage()
public long getErrorCount()
public double getMaxThroughput()
public Number getPercentPoint(double percent)
public long getCount()
public Number getMax()
public double getMean()
public Number getMeanAsNumber()
public Number getMedian()
public Number getMin()
public Number getPercentPoint(float percent)
public double getStandardDeviation()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.