Package com.linkedin.venice.stats
Class TehutiUtils.RatioStat
java.lang.Object
io.tehuti.metrics.stats.AsyncGauge
com.linkedin.venice.stats.LambdaStat
com.linkedin.venice.stats.TehutiUtils.RatioStat
- All Implemented Interfaces:
- io.tehuti.metrics.Measurable,- io.tehuti.metrics.MeasurableStat,- io.tehuti.metrics.NamedMeasurableStat,- io.tehuti.metrics.Stat
- Enclosing class:
- TehutiUtils
Generate a ratio stat that is based on two arbitrary 
Rate. It calculates the proportion of one
 Stat over the sum of two Stats. This method is mostly used to calculate the bad request ratio (bad / (good + bad))
 Use Rate instead of SampledStat to capture the event rate, so that the result
 won't get impacted by the un-aligned windows introduced by SampledStat.
 More background: SampledStat is not maintaining sliding windows based on absolute time, and the new window
 creation is triggered by new event, considering the event for different metrics could happen at different rate/time,
 the sliding-windows being used by different metrics will be different. In this case, if we want to emit the ratio
 of two metrics, the result won't reflect the actual data since the nominator could use the window starting from time: t1,
 and the denominator could use the window starting from time: t2.
 By using Rate, the ratio metric will be more reasonable since it doesn't depend on the actual window size/starting time,
 but the average event frequency. It is still not perfect, since both nominator and denominator metrics could still
 use different window size/starting time.
 The ultimate solution should be to use the consistent windowing (based on absolute time) across all the metrics.- 
Nested Class SummaryNested classes/interfaces inherited from class io.tehuti.metrics.stats.AsyncGaugeio.tehuti.metrics.stats.AsyncGauge.AsyncGaugeExecutor
- 
Field SummaryFields inherited from class io.tehuti.metrics.stats.AsyncGaugeDEFAULT_ASYNC_GAUGE_EXECUTOR
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class io.tehuti.metrics.stats.AsyncGaugegetStatName, measure, recordMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.tehuti.metrics.MeasurablemeasureWithExtraValue
- 
Constructor Details- 
RatioStatpublic RatioStat(io.tehuti.metrics.stats.Rate one, io.tehuti.metrics.stats.Rate two, String metricName) 
 
-