public class ThresholdMeter extends Object implements org.apache.flink.metrics.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.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ThresholdMeter.ThresholdExceedException
Exception thrown when a threshold exceeds.
|
| 构造器和说明 |
|---|
ThresholdMeter(double maxEventsPerInterval,
java.time.Duration interval) |
ThresholdMeter(double maxEventsPerInterval,
java.time.Duration interval,
org.apache.flink.util.clock.Clock clock) |
public ThresholdMeter(double maxEventsPerInterval,
java.time.Duration interval)
@VisibleForTesting
public ThresholdMeter(double maxEventsPerInterval,
java.time.Duration interval,
org.apache.flink.util.clock.Clock clock)
public void markEvent()
markEvent 在接口中 org.apache.flink.metrics.Meterpublic void markEvent(long n)
markEvent 在接口中 org.apache.flink.metrics.Meterpublic double getRate()
getRate 在接口中 org.apache.flink.metrics.Meterpublic long getCount()
getCount 在接口中 org.apache.flink.metrics.Meterpublic void checkAgainstThreshold()
throws ThresholdMeter.ThresholdExceedException
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.