Class SamplerMetric
java.lang.Object
org.apache.jmeter.visualizers.backend.SamplerMetric
Sampler metric
- Since:
- 2.13
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(SampleResult result) Add aSampleResultto be used in the statisticsvoidaddCumulated(SampleResult result) Add aSampleResultand its sub-results to be used in the statisticsdoubleGet the maximal elapsed time for requests within sliding windowdoubleGet the arithmetic mean of the stored valuesdoubleGet the minimal elapsed time for requests within sliding windowdoublegetAllPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.Returns by type ( response code and message ) the count of errors occursintGet the number of failed requests for the current time slotintgetHits()Returns hits to serverdoubleGet the maximal elapsed time for requests within sliding windowdoubleGet the arithmetic mean of the stored valuesdoubleGet the minimal elapsed time for requests within sliding windowdoublegetKoPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.doubleGet the maximal elapsed time for requests within sliding windowdoubleGet the arithmetic mean of the stored valuesdoubleGet the minimal elapsed time for requests within sliding windowdoublegetOkPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.longlongintGet the number of successful requests for the current time slotintgetTotal()Get the number of total requests for the current time slotvoidReset metric except for percentile related datastatic voidsetDefaultWindowMode(WindowMode windowMode) Deprecated.only used for internal testing
- 
Constructor Details- 
SamplerMetricpublic SamplerMetric()
 
- 
- 
Method Details- 
setDefaultWindowMode@Deprecated @VisibleForTesting(visibility=PRIVATE) public static void setDefaultWindowMode(WindowMode windowMode) Deprecated.only used for internal testingSetWindowModeto use for newly created metrics.- Parameters:
- windowMode- new visibility mode
 
- 
addAdd aSampleResultto be used in the statistics- Parameters:
- result-- SampleResultto be used
 
- 
addCumulatedAdd aSampleResultand its sub-results to be used in the statistics- Parameters:
- result-- SampleResultto be used
 
- 
resetForTimeIntervalpublic void resetForTimeInterval()Reset metric except for percentile related data
- 
getTotalpublic int getTotal()Get the number of total requests for the current time slot- Returns:
- number of total requests
 
- 
getSuccessespublic int getSuccesses()Get the number of successful requests for the current time slot- Returns:
- number of successful requests
 
- 
getFailurespublic int getFailures()Get the number of failed requests for the current time slot- Returns:
- number of failed requests
 
- 
getOkMaxTimepublic double getOkMaxTime()Get the maximal elapsed time for requests within sliding window- Returns:
- the maximal elapsed time, or 0if no requests have been added yet
 
- 
getOkMinTimepublic double getOkMinTime()Get the minimal elapsed time for requests within sliding window- Returns:
- the minTime, or Long.MAX_VALUEif no requests have been added yet
 
- 
getOkMeanpublic double getOkMean()Get the arithmetic mean of the stored values- Returns:
- The arithmetic mean of the stored values
 
- 
getOkPercentilepublic double getOkPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.- Parameters:
- percentile- the requested percentile (scaled from 0 - 100)
- Returns:
- Returns an estimate for the requested percentile of the stored values.
 
- 
getKoMaxTimepublic double getKoMaxTime()Get the maximal elapsed time for requests within sliding window- Returns:
- the maximal elapsed time, or 0if no requests have been added yet
 
- 
getKoMinTimepublic double getKoMinTime()Get the minimal elapsed time for requests within sliding window- Returns:
- the minTime, or Long.MAX_VALUEif no requests have been added yet
 
- 
getKoMeanpublic double getKoMean()Get the arithmetic mean of the stored values- Returns:
- The arithmetic mean of the stored values
 
- 
getKoPercentilepublic double getKoPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.- Parameters:
- percentile- the requested percentile (scaled from 0 - 100)
- Returns:
- Returns an estimate for the requested percentile of the stored values.
 
- 
getAllMaxTimepublic double getAllMaxTime()Get the maximal elapsed time for requests within sliding window- Returns:
- the maximal elapsed time, or 0if no requests have been added yet
 
- 
getAllMinTimepublic double getAllMinTime()Get the minimal elapsed time for requests within sliding window- Returns:
- the minTime, or Long.MAX_VALUEif no requests have been added yet
 
- 
getAllMeanpublic double getAllMean()Get the arithmetic mean of the stored values- Returns:
- The arithmetic mean of the stored values
 
- 
getAllPercentilepublic double getAllPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.- Parameters:
- percentile- the requested percentile (scaled from 0 - 100)
- Returns:
- Returns an estimate for the requested percentile of the stored values.
 
- 
getHitspublic int getHits()Returns hits to server- Returns:
- the hits
 
- 
getErrorsReturns by type ( response code and message ) the count of errors occurs- Returns:
- errors
 
- 
getSentBytespublic long getSentBytes()- Returns:
- the sentBytes
 
- 
getReceivedBytespublic long getReceivedBytes()- Returns:
- the receivedBytes
 
 
-