Interface DistributionSummary

All Superinterfaces:
HistogramSupport, Meter
All Known Implementing Classes:
AbstractDistributionSummary, CumulativeDistributionSummary, DropwizardDistributionSummary, NoopDistributionSummary, StepDistributionSummary

public interface DistributionSummary extends Meter, HistogramSupport
Track the sample distribution of events. An example would be the response sizes for requests hitting an http server.
  • Method Details

    • builder

      static DistributionSummary.Builder builder(String name)
    • record

      void record(double amount)
      Updates the statistics kept by the summary with the specified amount.
      Parameters:
      amount - Amount for an event being measured. For example, if the size in bytes of responses from a server. If the amount is less than 0 the value will be dropped.
    • count

      long count()
      Returns:
      The number of times that record has been called since this timer was created.
    • totalAmount

      double totalAmount()
      Returns:
      The total amount of all recorded events.
    • mean

      default double mean()
      Returns:
      The distribution average for all recorded events.
    • max

      double max()
      Returns:
      The maximum time of a single event.
    • histogramCountAtValue

      @Deprecated default double histogramCountAtValue(long value)
      Deprecated.
      Use HistogramSupport.takeSnapshot() to retrieve bucket counts.
      Provides cumulative histogram counts.
      Parameters:
      value - The histogram bucket to retrieve a count for.
      Returns:
      The count of all events less than or equal to the bucket. If value does not match a preconfigured bucket boundary, returns NaN.
    • percentile

      @Deprecated default double percentile(double percentile)
      Deprecated.
      Use HistogramSupport.takeSnapshot() to retrieve percentiles.
      Parameters:
      percentile - A percentile in the domain [0, 1]. For example, 0.5 represents the 50th percentile of the distribution.
      Returns:
      The latency at a specific percentile. This value is non-aggregable across dimensions. Returns NaN if percentile is not a preconfigured percentile that Micrometer is tracking.
    • measure

      default Iterable<Measurement> measure()
      Description copied from interface: Meter
      Get a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
      Specified by:
      measure in interface Meter
      Returns:
      The set of measurements that represents the instantaneous value of this meter.