Class HistogramImpl

  • All Implemented Interfaces:
    org.eclipse.microprofile.metrics.Counting, org.eclipse.microprofile.metrics.Histogram, org.eclipse.microprofile.metrics.Metric, org.eclipse.microprofile.metrics.Sampling

    @Vetoed
    public class HistogramImpl
    extends Object
    implements org.eclipse.microprofile.metrics.Histogram
    A metric which calculates the distribution of a value.
    See Also:
    Accurately computing running variance
    • Method Detail

      • update

        public void update​(int value)
        Adds a recorded value.
        Specified by:
        update in interface org.eclipse.microprofile.metrics.Histogram
        Parameters:
        value - the length of the value
      • update

        public void update​(long value)
        Adds a recorded value.
        Specified by:
        update in interface org.eclipse.microprofile.metrics.Histogram
        Parameters:
        value - the length of the value
      • getCount

        public long getCount()
        Returns the number of values recorded.
        Specified by:
        getCount in interface org.eclipse.microprofile.metrics.Counting
        Specified by:
        getCount in interface org.eclipse.microprofile.metrics.Histogram
        Returns:
        the number of values recorded
      • getSum

        public long getSum()
        Specified by:
        getSum in interface org.eclipse.microprofile.metrics.Histogram
      • getSnapshot

        public org.eclipse.microprofile.metrics.Snapshot getSnapshot()
        Specified by:
        getSnapshot in interface org.eclipse.microprofile.metrics.Histogram
        Specified by:
        getSnapshot in interface org.eclipse.microprofile.metrics.Sampling