Class HttpMetrics

java.lang.Object
io.split.client.metrics.HttpMetrics
All Implemented Interfaces:
DTOMetrics, Metrics

public class HttpMetrics
extends Object
implements Metrics, DTOMetrics
Created by adilaijaz on 9/4/15.
  • Constructor Details

  • Method Details

    • create

      public static HttpMetrics create​(org.apache.http.impl.client.CloseableHttpClient client, URI root) throws URISyntaxException
      Throws:
      URISyntaxException
    • time

      public void time​(Latency dto)
      Specified by:
      time in interface DTOMetrics
    • count

      public void count​(Counter dto)
      Specified by:
      count in interface DTOMetrics
    • count

      public void count​(String counter, long delta)
      Description copied from interface: Metrics
      Adjusts the specified counter by a given delta.

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

      Specified by:
      count in interface Metrics
      Parameters:
      counter - the name of the counter to adjust
      delta - the amount to adjust the counter by
    • time

      public void time​(String operation, long timeInMs)
      Description copied from interface: Metrics
      Records an execution time in milliseconds for the specified named operation.

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

      Specified by:
      time in interface Metrics
      Parameters:
      operation - the name of the timed operation
      timeInMs - the time in milliseconds