Class TehutiUtils

java.lang.Object
com.linkedin.venice.stats.TehutiUtils

public class TehutiUtils extends Object
Utils for venice metrics
  • Constructor Details

    • TehutiUtils

      public TehutiUtils()
  • Method Details

    • getPercentileStat

      public static io.tehuti.metrics.stats.Percentiles getPercentileStat(String sensorName, String storeName)
      TODO: need to investigate why percentiles with big values (> 10^6) won't show in InGraph.
    • getPercentileStatWithAvgAndMax

      public static io.tehuti.metrics.MeasurableStat[] getPercentileStatWithAvgAndMax(String sensorName, String storeName)
    • getFineGrainedPercentileStatWithAvgAndMax

      public static io.tehuti.metrics.MeasurableStat[] getFineGrainedPercentileStatWithAvgAndMax(String sensorName, String storeName)
    • getFineGrainedPercentileStat

      public static io.tehuti.metrics.stats.Percentiles getFineGrainedPercentileStat(String sensorName, String storeName)
    • getPercentileStatForNetworkLatency

      public static io.tehuti.metrics.stats.Percentiles getPercentileStatForNetworkLatency(String sensorName, String storeName)
      Generate a histogram stat that emits P50, P77, P90, P95, P99 and P99.9 values. N.B.: These are useful percentiles to estimate the latency we would get with speculative queries: P77 latency with one query would become: P95 with the fastest of two queries, and P99 with the fastest of three P90 latency with one query would become: P99 with the fastest of two queries, and P99.9 with the fastest of three
    • getPercentileStat

      public static io.tehuti.metrics.stats.Percentiles getPercentileStat(String name)
      Generate a histogram stat that emits P50, P95, and P99 values.
      Parameters:
      name -
      Returns:
      3 sub stats that emit p50, P95, and P99 values.
    • getPercentileStat

      public static io.tehuti.metrics.stats.Percentiles getPercentileStat(String name, int sizeInBytes, double max)
      Generate a histogram stat that emits P50, P95, and P99 values.
      Parameters:
      name -
      sizeInBytes - Histogram's memory consumption
      max - Histogram's max value
      Returns:
      3 sub stats that emit p50, P95, and P99 values.
    • getFineGrainedPercentileStat

      public static io.tehuti.metrics.stats.Percentiles getFineGrainedPercentileStat(String name, int sizeInBytes, double max)
    • getPercentileStat

      public static io.tehuti.metrics.stats.Percentiles getPercentileStat(String name, int sizeInBytes, double max, double... percentiles)
    • getMetricsRepository

      public static io.tehuti.metrics.MetricsRepository getMetricsRepository(String serviceName)
      Get default MetricRepository. It will emit metrics via JMX.
      Parameters:
      serviceName - Prefix name of all emitted metrics
      Returns:
    • fixMalformedMetricName

      public static String fixMalformedMetricName(String metricName)
      A valid metric name needs to pass the test in ObjectName. This helper function will try to fix all invalid character mentioned in the above function to avoid MalformedObjectNameException; besides, dot(.) will also be replaced since dot is a separator used in InGraph.