Interface Metrics

All Known Implementing Classes:
CachedMetrics, FireAndForgetMetrics, HttpMetrics, Metrics.NoopMetrics

public interface Metrics
This interface is a briefer version of StatsD interface
Author:
adil
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  Metrics.NoopMetrics  
  • Method Summary

    Modifier and Type Method Description
    void count​(String counter, long delta)
    Adjusts the specified counter by a given delta.
    void time​(String operation, long timeInMs)
    Records an execution time in milliseconds for the specified named operation.
  • Method Details

    • count

      void count​(String counter, long delta)
      Adjusts the specified counter by a given delta.

      This method is is non-blocking and is guaranteed not to throw an exception.

      Parameters:
      counter - the name of the counter to adjust
      delta - the amount to adjust the counter by
    • time

      void time​(String operation, long timeInMs)
      Records an execution time in milliseconds for the specified named operation.

      This method is non-blocking and is guaranteed not to throw an exception.

      Parameters:
      operation - the name of the timed operation
      timeInMs - the time in milliseconds