Class PercentileCalculator.PercentileStats

java.lang.Object
com.nmontytskyi.monitoring.detector.PercentileCalculator.PercentileStats
Enclosing class:
PercentileCalculator

public static final class PercentileCalculator.PercentileStats extends Object
Immutable container holding three response time percentiles.
  • Method Details

    • of

      public static PercentileCalculator.PercentileStats of(long p50, long p95, long p99)
      Creates an instance with the given percentile values.
    • empty

      public static PercentileCalculator.PercentileStats empty()
      Returns an empty instance (all values = 0) for the case of no data.
    • getP50

      public long getP50()
      Returns:
      median response time (milliseconds)
    • getP95

      public long getP95()
      Returns:
      95th percentile response time (milliseconds)
    • getP99

      public long getP99()
      Returns:
      99th percentile response time (milliseconds)
    • toString

      public String toString()
      Overrides:
      toString in class Object