Class SamplerMetric

  • All Implemented Interfaces:

    
    public class SamplerMetric
    
                        

    Sampler metric

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      SamplerMetric()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getSuccesses() Get the number of successful requests for the current time slot
      int getFailures() Get the number of failed requests for the current time slot
      int getHits() Returns hits to server
      Map<ErrorMetric, Integer> getErrors() Returns by type ( response code and message ) the count of errors occurs
      long getSentBytes()
      long getReceivedBytes()
      static void setDefaultWindowMode(WindowMode windowMode) Set WindowMode to use for newly created metrics.
      synchronized void add(SampleResult result) Add a SampleResult to be used in the statistics
      synchronized void addCumulated(SampleResult result) Add a SampleResult and its sub-results to be used in the statistics
      synchronized void resetForTimeInterval() Reset metric except for percentile related data
      int getTotal() Get the number of total requests for the current time slot
      double getOkMaxTime() Get the maximal elapsed time for requests within sliding window
      double getOkMinTime() Get the minimal elapsed time for requests within sliding window
      double getOkMean() Get the arithmetic mean of the stored values
      double getOkPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.
      double getKoMaxTime() Get the maximal elapsed time for requests within sliding window
      double getKoMinTime() Get the minimal elapsed time for requests within sliding window
      double getKoMean() Get the arithmetic mean of the stored values
      double getKoPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.
      double getAllMaxTime() Get the maximal elapsed time for requests within sliding window
      double getAllMinTime() Get the minimal elapsed time for requests within sliding window
      double getAllMean() Get the arithmetic mean of the stored values
      double getAllPercentile(double percentile) Returns an estimate for the requested percentile of the stored values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SamplerMetric

        SamplerMetric()
    • Method Detail

      • getSuccesses

         int getSuccesses()

        Get the number of successful requests for the current time slot

      • getFailures

         int getFailures()

        Get the number of failed requests for the current time slot

      • getHits

         int getHits()

        Returns hits to server

      • setDefaultWindowMode

        @Deprecated()@VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) static void setDefaultWindowMode(WindowMode windowMode)

        Set WindowMode to use for newly created metrics.

        Parameters:
        windowMode - new visibility mode
      • add

         synchronized void add(SampleResult result)

        Add a SampleResult to be used in the statistics

        Parameters:
        result - SampleResult to be used
      • addCumulated

         synchronized void addCumulated(SampleResult result)

        Add a SampleResult and its sub-results to be used in the statistics

        Parameters:
        result - SampleResult to be used
      • resetForTimeInterval

         synchronized void resetForTimeInterval()

        Reset metric except for percentile related data

      • getTotal

         int getTotal()

        Get the number of total requests for the current time slot

      • getOkMaxTime

         double getOkMaxTime()

        Get the maximal elapsed time for requests within sliding window

      • getOkMinTime

         double getOkMinTime()

        Get the minimal elapsed time for requests within sliding window

      • getOkMean

         double getOkMean()

        Get the arithmetic mean of the stored values

      • getOkPercentile

         double getOkPercentile(double percentile)

        Returns an estimate for the requested percentile of the stored values.

        Parameters:
        percentile - the requested percentile (scaled from 0 - 100)
      • getKoMaxTime

         double getKoMaxTime()

        Get the maximal elapsed time for requests within sliding window

      • getKoMinTime

         double getKoMinTime()

        Get the minimal elapsed time for requests within sliding window

      • getKoMean

         double getKoMean()

        Get the arithmetic mean of the stored values

      • getKoPercentile

         double getKoPercentile(double percentile)

        Returns an estimate for the requested percentile of the stored values.

        Parameters:
        percentile - the requested percentile (scaled from 0 - 100)
      • getAllMaxTime

         double getAllMaxTime()

        Get the maximal elapsed time for requests within sliding window

      • getAllMinTime

         double getAllMinTime()

        Get the minimal elapsed time for requests within sliding window

      • getAllMean

         double getAllMean()

        Get the arithmetic mean of the stored values

      • getAllPercentile

         double getAllPercentile(double percentile)

        Returns an estimate for the requested percentile of the stored values.

        Parameters:
        percentile - the requested percentile (scaled from 0 - 100)