Class Histogram.Child

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Histogram.Child.Value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Child​(double[] buckets)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Histogram.Child.Value get()
      Get the value of the Histogram.
      void observe​(double amt)
      Observe the given amount.
      Histogram.Timer startTimer()
      Start a timer to track a duration.
      double time​(java.lang.Runnable timeable)
      Executes runnable code (e.g.
      <E> E time​(java.util.concurrent.Callable<E> timeable)
      Executes callable code (e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • upperBounds

        private final double[] upperBounds
      • cumulativeCounts

        private final DoubleAdder[] cumulativeCounts
    • Constructor Detail

      • Child

        private Child​(double[] buckets)
    • Method Detail

      • time

        public double time​(java.lang.Runnable timeable)
        Executes runnable code (e.g. a Java 8 Lambda) and observes a duration of how long it took to run.
        Parameters:
        timeable - Code that is being timed
        Returns:
        Measured duration in seconds for timeable to complete.
      • time

        public <E> E time​(java.util.concurrent.Callable<E> timeable)
        Executes callable code (e.g. a Java 8 Lambda) and observes a duration of how long it took to run.
        Parameters:
        timeable - Code that is being timed
        Returns:
        Result returned by callable.
      • observe

        public void observe​(double amt)
        Observe the given amount.