Class HistogramSnapshot

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

public final class HistogramSnapshot
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    HistogramSnapshot​(long count, double total, double max, ValueAtPercentile[] percentileValues, CountAtBucket[] histogramCounts, java.util.function.BiConsumer<java.io.PrintStream,​java.lang.Double> summaryOutput)  
  • Method Summary

    Modifier and Type Method Description
    long count()  
    static HistogramSnapshot empty​(long count, double total, double max)  
    CountAtBucket[] histogramCounts()  
    double max()  
    double max​(java.util.concurrent.TimeUnit unit)  
    double mean()  
    double mean​(java.util.concurrent.TimeUnit unit)  
    void outputSummary​(java.io.PrintStream out, double scale)  
    ValueAtPercentile[] percentileValues()  
    java.lang.String toString()  
    double total()  
    double total​(java.util.concurrent.TimeUnit unit)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HistogramSnapshot

      public HistogramSnapshot​(long count, double total, double max, @Nullable ValueAtPercentile[] percentileValues, @Nullable CountAtBucket[] histogramCounts, @Nullable java.util.function.BiConsumer<java.io.PrintStream,​java.lang.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​(java.util.concurrent.TimeUnit unit)
    • max

      public double max()
    • max

      public double max​(java.util.concurrent.TimeUnit unit)
    • mean

      public double mean()
    • mean

      public double mean​(java.util.concurrent.TimeUnit unit)
    • percentileValues

      public ValueAtPercentile[] percentileValues()
    • histogramCounts

      public CountAtBucket[] histogramCounts()
    • toString

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

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

      public void outputSummary​(java.io.PrintStream out, double scale)