Class DataSketchesOpStatsLogger
- java.lang.Object
-
- org.apache.pulsar.broker.stats.prometheus.metrics.DataSketchesOpStatsLogger
-
- All Implemented Interfaces:
org.apache.bookkeeper.stats.OpStatsLogger
public class DataSketchesOpStatsLogger extends java.lang.Object implements org.apache.bookkeeper.stats.OpStatsLoggerOpStatsLogger implementation that uses DataSketches library to calculate the approximated latency quantiles.
-
-
Constructor Summary
Constructors Constructor Description DataSketchesOpStatsLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()longgetCount(boolean success)doublegetQuantileValue(boolean success, double quantile)longgetSum(boolean success)voidregisterFailedEvent(long eventLatency, java.util.concurrent.TimeUnit unit)voidregisterFailedValue(long value)voidregisterSuccessfulEvent(long eventLatency, java.util.concurrent.TimeUnit unit)voidregisterSuccessfulValue(long value)voidrotateLatencyCollection()org.apache.bookkeeper.stats.OpStatsDatatoOpStatsData()
-
-
-
Method Detail
-
registerFailedEvent
public void registerFailedEvent(long eventLatency, java.util.concurrent.TimeUnit unit)- Specified by:
registerFailedEventin interfaceorg.apache.bookkeeper.stats.OpStatsLogger
-
registerSuccessfulEvent
public void registerSuccessfulEvent(long eventLatency, java.util.concurrent.TimeUnit unit)- Specified by:
registerSuccessfulEventin interfaceorg.apache.bookkeeper.stats.OpStatsLogger
-
registerSuccessfulValue
public void registerSuccessfulValue(long value)
- Specified by:
registerSuccessfulValuein interfaceorg.apache.bookkeeper.stats.OpStatsLogger
-
registerFailedValue
public void registerFailedValue(long value)
- Specified by:
registerFailedValuein interfaceorg.apache.bookkeeper.stats.OpStatsLogger
-
toOpStatsData
public org.apache.bookkeeper.stats.OpStatsData toOpStatsData()
- Specified by:
toOpStatsDatain interfaceorg.apache.bookkeeper.stats.OpStatsLogger
-
clear
public void clear()
- Specified by:
clearin interfaceorg.apache.bookkeeper.stats.OpStatsLogger
-
rotateLatencyCollection
public void rotateLatencyCollection()
-
getCount
public long getCount(boolean success)
-
getSum
public long getSum(boolean success)
-
getQuantileValue
public double getQuantileValue(boolean success, double quantile)
-
-