Class LatencySummary

java.lang.Object
org.acemq.workloads.metrics.LatencySummary

public final class LatencySummary extends Object
Latency percentiles from one run.

The percentiles are reported and the mean is available but deliberately not printed first. A mean latency is the number least likely to describe anybody's experience: it hides the tail entirely, and the tail is what users notice and what capacity planning is about.

  • Method Details

    • empty

      public static LatencySummary empty(String name)
      Returns:
      an empty summary, for a measurement that recorded nothing
    • name

      public String name()
    • count

      public long count()
      Returns:
      how many observations this is built from
    • min

      public Duration min()
    • max

      public Duration max()
    • mean

      public Duration mean()
    • p50

      public Duration p50()
    • p90

      public Duration p90()
    • p99

      public Duration p99()
    • p999

      public Duration p999()
      Returns:
      the 99.9th percentile: one request in a thousand is worse than this
    • p9999

      public Duration p9999()
    • percentile

      public Duration percentile(double percentile)
      Parameters:
      percentile - between 0 and 100
      Returns:
      the value at it
    • tailRatio

      public double tailRatio()
      Returns:
      how many times worse the 99th percentile is than the median. Above about 10 the distribution has a tail worth explaining — a mean or a median alone would not show it
    • isEmpty

      public boolean isEmpty()
      Returns:
      whether anything was recorded
    • format

      public String format()
      Returns:
      a fixed-width line for a report
    • toString

      public String toString()
      Overrides:
      toString in class Object