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
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 ClassesModifier and TypeClassDescriptionstatic classException thrown when a threshold exceeds. -
Constructor Summary
ConstructorsConstructorDescriptionThresholdMeter(double maxEventsPerInterval, Duration interval) ThresholdMeter(double maxEventsPerInterval, Duration interval, org.apache.flink.util.clock.Clock clock) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.metrics.Meter
getMetricType
-
Constructor Details
-
ThresholdMeter
-
ThresholdMeter
@VisibleForTesting public ThresholdMeter(double maxEventsPerInterval, Duration interval, org.apache.flink.util.clock.Clock clock)
-
-
Method Details
-
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
-