Class FcCommandMetrics.LatencySnapshot

java.lang.Object
org.frontcache.resilience.FcCommandMetrics.LatencySnapshot
Enclosing class:
FcCommandMetrics

public static final class FcCommandMetrics.LatencySnapshot extends Object
The mean and the nine percentiles, read from ONE merge of the bucket ring. The merge is the expensive part - it allocates a Histogram sized for FcCommandMetrics.MAX_TRACKED_LATENCY_MS at three significant digits (on the order of ten thousand counters) and folds every bucket into it. Both numbers come from the same merge here because every consumer wants both, and taking them through FcCommandMetrics.getLatencyMean() and FcCommandMetrics.getLatencyPercentiles() separately paid for the merge twice. Immutable, so a caller can hold one for the duration of a frame or a scrape.
  • Method Details

    • getMean

      public long getMean()
    • getPercentiles

      public Map<String,Long> getPercentiles()
      The percentile map the dashboard expects, with its exact key set and order.