Class HistogramSnapshot

java.lang.Object
io.micrometer.core.instrument.distribution.HistogramSnapshot

public final class HistogramSnapshot extends Object
  • Constructor Details

    • HistogramSnapshot

      public HistogramSnapshot(long count, double total, double max, @Nullable ValueAtPercentile[] percentileValues, @Nullable CountAtBucket[] histogramCounts, @Nullable BiConsumer<PrintStream,Double> summaryOutput)
      Parameters:
      count - Total number of recordings
      total - In nanos if a unit of time
      max - In nanos if a unit of time
      percentileValues - Pre-computed percentiles.
      histogramCounts - Bucket counts.
      summaryOutput - A function defining how to print the histogram.
  • Method Details

    • count

      public long count()
    • total

      public double total()
    • total

      public double total(TimeUnit unit)
    • max

      public double max()
    • max

      public double max(TimeUnit unit)
    • mean

      public double mean()
    • mean

      public double mean(TimeUnit unit)
    • percentileValues

      public ValueAtPercentile[] percentileValues()
    • histogramCounts

      public CountAtBucket[] histogramCounts()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • empty

      public static HistogramSnapshot empty(long count, double total, double max)
    • outputSummary

      public void outputSummary(PrintStream out, double scale)