Package com.linkedin.venice.stats
Class TehutiUtils
- java.lang.Object
-
- com.linkedin.venice.stats.TehutiUtils
-
public class TehutiUtils extends java.lang.ObjectUtils for venice metrics
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTehutiUtils.RatioStatGenerate a ratio stat that is based on two arbitraryRate.static classTehutiUtils.SimpleRatioStatGenerate a ratio stat that is based on two arbitraryMeasurableStat.
-
Constructor Summary
Constructors Constructor Description TehutiUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringfixMalformedMetricName(java.lang.String metricName)A valid metric name needs to pass the test inObjectName.static io.tehuti.metrics.stats.PercentilesgetFineGrainedPercentileStat(java.lang.String name, int sizeInBytes, double max)static io.tehuti.metrics.stats.PercentilesgetFineGrainedPercentileStat(java.lang.String sensorName, java.lang.String storeName)static io.tehuti.metrics.MeasurableStat[]getFineGrainedPercentileStatWithAvgAndMax(java.lang.String sensorName, java.lang.String storeName)static io.tehuti.metrics.MetricsRepositorygetMetricsRepository(java.lang.String serviceName)Get default MetricRepository.static io.tehuti.metrics.stats.PercentilesgetPercentileStat(java.lang.String name)Generate a histogram stat that emits P50, P95, and P99 values.static io.tehuti.metrics.stats.PercentilesgetPercentileStat(java.lang.String name, int sizeInBytes, double max)Generate a histogram stat that emits P50, P95, and P99 values.static io.tehuti.metrics.stats.PercentilesgetPercentileStat(java.lang.String name, int sizeInBytes, double max, double... percentiles)static io.tehuti.metrics.stats.PercentilesgetPercentileStat(java.lang.String sensorName, java.lang.String storeName)TODO: need to investigate why percentiles with big values (> 10^6) won't show in InGraph.static io.tehuti.metrics.stats.PercentilesgetPercentileStatForNetworkLatency(java.lang.String sensorName, java.lang.String storeName)Generate a histogram stat that emits P50, P77, P90, P95, P99 and P99.9 values.static io.tehuti.metrics.MeasurableStat[]getPercentileStatWithAvgAndMax(java.lang.String sensorName, java.lang.String storeName)
-
-
-
Method Detail
-
getPercentileStat
public static io.tehuti.metrics.stats.Percentiles getPercentileStat(java.lang.String sensorName, java.lang.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(java.lang.String sensorName, java.lang.String storeName)
-
getFineGrainedPercentileStatWithAvgAndMax
public static io.tehuti.metrics.MeasurableStat[] getFineGrainedPercentileStatWithAvgAndMax(java.lang.String sensorName, java.lang.String storeName)
-
getFineGrainedPercentileStat
public static io.tehuti.metrics.stats.Percentiles getFineGrainedPercentileStat(java.lang.String sensorName, java.lang.String storeName)
-
getPercentileStatForNetworkLatency
public static io.tehuti.metrics.stats.Percentiles getPercentileStatForNetworkLatency(java.lang.String sensorName, java.lang.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(java.lang.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(java.lang.String name, int sizeInBytes, double max)Generate a histogram stat that emits P50, P95, and P99 values.- Parameters:
name-sizeInBytes- Histogram's memory consumptionmax- Histogram's max value- Returns:
- 3 sub stats that emit p50, P95, and P99 values.
-
getFineGrainedPercentileStat
public static io.tehuti.metrics.stats.Percentiles getFineGrainedPercentileStat(java.lang.String name, int sizeInBytes, double max)
-
getPercentileStat
public static io.tehuti.metrics.stats.Percentiles getPercentileStat(java.lang.String name, int sizeInBytes, double max, double... percentiles)
-
getMetricsRepository
public static io.tehuti.metrics.MetricsRepository getMetricsRepository(java.lang.String serviceName)
Get default MetricRepository. It will emit metrics via JMX.- Parameters:
serviceName- Prefix name of all emitted metrics- Returns:
-
fixMalformedMetricName
public static java.lang.String fixMalformedMetricName(java.lang.String metricName)
A valid metric name needs to pass the test inObjectName. 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.
-
-