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