Class SamplerMetric

  • All Implemented Interfaces:

    
    public class SamplerMetric
    
                        

    Sampler metric

    Since:

    2.13

    • 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

        Returns:

        number of successful requests

      • getFailures

         int getFailures()

        Get the number of failed requests for the current time slot

        Returns:

        number of failed requests

      • getHits

         int getHits()

        Returns hits to server

        Returns:

        the hits

      • 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

        Returns:

        number of total requests

      • getOkMaxTime

         double getOkMaxTime()

        Get the maximal elapsed time for requests within sliding window

        Returns:

        the maximal elapsed time, or 0 if no requests have been added yet

      • getOkMinTime

         double getOkMinTime()

        Get the minimal elapsed time for requests within sliding window

        Returns:

        the minTime, or MAX_VALUE if no requests have been added yet

      • getOkMean

         double getOkMean()

        Get the arithmetic mean of the stored values

        Returns:

        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)
        Returns:

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

      • getKoMaxTime

         double getKoMaxTime()

        Get the maximal elapsed time for requests within sliding window

        Returns:

        the maximal elapsed time, or 0 if no requests have been added yet

      • getKoMinTime

         double getKoMinTime()

        Get the minimal elapsed time for requests within sliding window

        Returns:

        the minTime, or MAX_VALUE if no requests have been added yet

      • getKoMean

         double getKoMean()

        Get the arithmetic mean of the stored values

        Returns:

        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)
        Returns:

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

      • getAllMaxTime

         double getAllMaxTime()

        Get the maximal elapsed time for requests within sliding window

        Returns:

        the maximal elapsed time, or 0 if no requests have been added yet

      • getAllMinTime

         double getAllMinTime()

        Get the minimal elapsed time for requests within sliding window

        Returns:

        the minTime, or MAX_VALUE if no requests have been added yet

      • getAllMean

         double getAllMean()

        Get the arithmetic mean of the stored values

        Returns:

        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)
        Returns:

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