public class SamplerMetric extends Object
| Constructor and Description | 
|---|
SamplerMetric()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(SampleResult result)
Add a  
SampleResult to be used in the statistics | 
double | 
getAllMaxTime()
Get the maximal elapsed time for requests within sliding window 
 | 
double | 
getAllMean()
Get the arithmetic mean of the stored values 
 | 
double | 
getAllMinTime()
Get the minimal elapsed time for requests within sliding window 
 | 
double | 
getAllPercentile(double percentile)
Returns an estimate for the requested percentile of the stored values. 
 | 
Map<ErrorMetric,Integer> | 
getErrors()
Returns by type ( response code and message ) the count of errors occurs 
 | 
int | 
getFailures()
Get the number of failed requests for the current time slot 
 | 
int | 
getHits()
Returns hits to server 
 | 
double | 
getKoMaxTime()
Get the maximal elapsed time for requests within sliding window 
 | 
double | 
getKoMean()
Get the arithmetic mean of the stored values 
 | 
double | 
getKoMinTime()
Get the minimal elapsed time for requests within sliding window 
 | 
double | 
getKoPercentile(double percentile)
Returns an estimate for the requested percentile of the stored values. 
 | 
double | 
getOkMaxTime()
Get the maximal elapsed time for requests within sliding window 
 | 
double | 
getOkMean()
Get the arithmetic mean of the stored values 
 | 
double | 
getOkMinTime()
Get the minimal elapsed time for requests within sliding window 
 | 
double | 
getOkPercentile(double percentile)
Returns an estimate for the requested percentile of the stored values. 
 | 
long | 
getReceivedBytes()  | 
long | 
getSentBytes()  | 
int | 
getSuccesses()
Get the number of successful requests for the current time slot 
 | 
int | 
getTotal()
Get the number of total requests for the current time slot 
 | 
void | 
resetForTimeInterval()
Reset metric except for percentile related data 
 | 
static void | 
setDefaultWindowMode(WindowMode windowMode)
Deprecated. 
 
only used for internal testing 
 | 
@Deprecated @VisibleForTesting(visibility=PRIVATE) public static void setDefaultWindowMode(WindowMode windowMode)
WindowMode to use for newly created metrics.windowMode - new visibility modepublic void add(SampleResult result)
SampleResult to be used in the statisticsresult - SampleResult to be usedpublic void resetForTimeInterval()
public int getTotal()
public int getSuccesses()
public int getFailures()
public double getOkMaxTime()
0 if no requests have
         been added yetpublic double getOkMinTime()
Long.MAX_VALUE if no requests have been
         added yetpublic double getOkMean()
public double getOkPercentile(double percentile)
percentile - the requested percentile (scaled from 0 - 100)public double getKoMaxTime()
0 if no requests have
         been added yetpublic double getKoMinTime()
Long.MAX_VALUE if no requests have been
         added yetpublic double getKoMean()
public double getKoPercentile(double percentile)
percentile - the requested percentile (scaled from 0 - 100)public double getAllMaxTime()
0 if no requests have
         been added yetpublic double getAllMinTime()
Long.MAX_VALUE if no requests have been
         added yetpublic double getAllMean()
public double getAllPercentile(double percentile)
percentile - the requested percentile (scaled from 0 - 100)public int getHits()
public Map<ErrorMetric,Integer> getErrors()
public long getSentBytes()
public long getReceivedBytes()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.