Class SnapshotImpl

java.lang.Object
io.github.resilience4j.core.metrics.SnapshotImpl
All Implemented Interfaces:
Snapshot

public class SnapshotImpl
extends java.lang.Object
implements Snapshot
  • Method Summary

    Modifier and Type Method Description
    java.time.Duration getAverageDuration()
    Returns the current average duration of all calls.
    float getFailureRate()
    Returns the current failure rate in percentage.
    int getNumberOfFailedCalls()
    Returns the current number of failed calls.
    int getNumberOfSlowFailedCalls()
    Returns the current number of failed calls which were slower than a certain threshold.
    int getNumberOfSlowSuccessfulCalls()
    Returns the current number of successful calls which were slower than a certain threshold.
    int getNumberOfSuccessfulCalls()
    Returns the current number of successful calls.
    float getSlowCallRate()
    Returns the current percentage of calls which were slower than a certain threshold.
    java.time.Duration getTotalDuration()
    Returns the current total duration of all calls.
    int getTotalNumberOfCalls()
    Returns the current total number of all calls.
    int getTotalNumberOfSlowCalls()
    Returns the current number of calls which were slower than a certain threshold.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getTotalDuration

      public java.time.Duration getTotalDuration()
      Description copied from interface: Snapshot
      Returns the current total duration of all calls.
      Specified by:
      getTotalDuration in interface Snapshot
      Returns:
      the current total duration of all calls
    • getTotalNumberOfSlowCalls

      public int getTotalNumberOfSlowCalls()
      Description copied from interface: Snapshot
      Returns the current number of calls which were slower than a certain threshold.
      Specified by:
      getTotalNumberOfSlowCalls in interface Snapshot
      Returns:
      the current number of calls which were slower than a certain threshold
    • getNumberOfSlowSuccessfulCalls

      public int getNumberOfSlowSuccessfulCalls()
      Description copied from interface: Snapshot
      Returns the current number of successful calls which were slower than a certain threshold.
      Specified by:
      getNumberOfSlowSuccessfulCalls in interface Snapshot
      Returns:
      the current number of successful calls which were slower than a certain threshold
    • getNumberOfSlowFailedCalls

      public int getNumberOfSlowFailedCalls()
      Description copied from interface: Snapshot
      Returns the current number of failed calls which were slower than a certain threshold.
      Specified by:
      getNumberOfSlowFailedCalls in interface Snapshot
      Returns:
      the current number of failed calls which were slower than a certain threshold
    • getSlowCallRate

      public float getSlowCallRate()
      Description copied from interface: Snapshot
      Returns the current percentage of calls which were slower than a certain threshold.
      Specified by:
      getSlowCallRate in interface Snapshot
      Returns:
      the current percentage of calls which were slower than a certain threshold
    • getNumberOfSuccessfulCalls

      public int getNumberOfSuccessfulCalls()
      Description copied from interface: Snapshot
      Returns the current number of successful calls.
      Specified by:
      getNumberOfSuccessfulCalls in interface Snapshot
      Returns:
      the current number of successful calls
    • getNumberOfFailedCalls

      public int getNumberOfFailedCalls()
      Description copied from interface: Snapshot
      Returns the current number of failed calls.
      Specified by:
      getNumberOfFailedCalls in interface Snapshot
      Returns:
      the current number of failed calls
    • getTotalNumberOfCalls

      public int getTotalNumberOfCalls()
      Description copied from interface: Snapshot
      Returns the current total number of all calls.
      Specified by:
      getTotalNumberOfCalls in interface Snapshot
      Returns:
      the current total number of all calls
    • getFailureRate

      public float getFailureRate()
      Description copied from interface: Snapshot
      Returns the current failure rate in percentage.
      Specified by:
      getFailureRate in interface Snapshot
      Returns:
      the current failure rate in percentage
    • getAverageDuration

      public java.time.Duration getAverageDuration()
      Description copied from interface: Snapshot
      Returns the current average duration of all calls.
      Specified by:
      getAverageDuration in interface Snapshot
      Returns:
      the current average duration of all calls