Class DropwizardTypes.DescribableTimer

    • Method Detail

      • record

        public void record​(long amount,
                           TimeUnit unit)
        Description copied from interface: Timer
        Updates the statistics kept by the counter with the specified amount.
        Specified by:
        record in interface Timer
        Parameters:
        amount - Duration of a single event being measured by this timer. If the amount is less than 0 the value will be dropped.
        unit - Time unit for the amount being recorded.
      • record

        public <T> T record​(Supplier<T> f)
        Description copied from interface: Timer
        Executes the Supplier `f` and records the time taken.
        Specified by:
        record in interface Timer
        Parameters:
        f - Function to execute and measure the execution time.
        Returns:
        The return value of `f`.
      • recordCallable

        public <T> T recordCallable​(Callable<T> f)
                             throws Exception
        Description copied from interface: Timer
        Executes the callable `f` and records the time taken.
        Specified by:
        recordCallable in interface Timer
        Parameters:
        f - Function to execute and measure the execution time.
        Returns:
        The return value of `f`.
        Throws:
        Exception
      • record

        public void record​(Runnable f)
        Description copied from interface: Timer
        Executes the runnable `f` and records the time taken.
        Specified by:
        record in interface Timer
        Parameters:
        f - Function to execute and measure the execution time.
      • count

        public long count()
        Description copied from interface: Timer
        The number of times that stop has been called on this timer.
        Specified by:
        count in interface Timer
      • totalTime

        public double totalTime​(TimeUnit unit)
        Description copied from interface: Timer
        The total time of recorded events.
        Specified by:
        totalTime in interface Timer
      • max

        public double max​(TimeUnit unit)
        Description copied from interface: Timer
        The maximum time of a single event.
        Specified by:
        max in interface Timer
      • percentile

        public double percentile​(double percentile,
                                 TimeUnit unit)
        Description copied from interface: Timer
        The latency at a specific percentile. This value is non-aggregable across dimensions.
        Specified by:
        percentile in interface Timer
      • histogramCountAtValue

        public double histogramCountAtValue​(long valueNanos)
        Specified by:
        histogramCountAtValue in interface Timer