Package org.apache.flink.runtime.metrics
Class ThresholdMeter
- java.lang.Object
-
- org.apache.flink.runtime.metrics.ThresholdMeter
-
- All Implemented Interfaces:
org.apache.flink.metrics.Meter,org.apache.flink.metrics.Metric
public class ThresholdMeter extends Object implements org.apache.flink.metrics.Meter
A timestamp queue based threshold meter.Note: This class is thread safe, at the price of synchronization overhead. Do not use this in performance sensitive scenarios, e.g., per-record updated metrics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classThresholdMeter.ThresholdExceedExceptionException thrown when a threshold exceeds.
-
Constructor Summary
Constructors Constructor Description ThresholdMeter(double maxEventsPerInterval, Duration interval)ThresholdMeter(double maxEventsPerInterval, Duration interval, org.apache.flink.util.clock.Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckAgainstThreshold()longgetCount()doublegetRate()voidmarkEvent()voidmarkEvent(long n)
-
-
-
Method Detail
-
markEvent
public void markEvent()
- Specified by:
markEventin interfaceorg.apache.flink.metrics.Meter
-
markEvent
public void markEvent(long n)
- Specified by:
markEventin interfaceorg.apache.flink.metrics.Meter
-
getRate
public double getRate()
- Specified by:
getRatein interfaceorg.apache.flink.metrics.Meter
-
getCount
public long getCount()
- Specified by:
getCountin interfaceorg.apache.flink.metrics.Meter
-
checkAgainstThreshold
public void checkAgainstThreshold() throws ThresholdMeter.ThresholdExceedException
-
-