Class ThroughputCalculator
java.lang.Object
org.apache.flink.runtime.throughput.ThroughputCalculator
Class for measuring the throughput based on incoming data size and measurement period.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongcalculateThroughput(long dataSize, long time) voidincomingDataSize(long receivedDataSize) voidMark when the time should not be taken into account.voidMark when the time should be included to the throughput calculation.
-
Constructor Details
-
ThroughputCalculator
public ThroughputCalculator(org.apache.flink.util.clock.Clock clock)
-
-
Method Details
-
incomingDataSize
public void incomingDataSize(long receivedDataSize) -
pauseMeasurement
public void pauseMeasurement()Mark when the time should not be taken into account. -
resumeMeasurement
public void resumeMeasurement()Mark when the time should be included to the throughput calculation. -
calculateThroughput
public long calculateThroughput()- Returns:
- Calculated throughput based on the collected data for the last period.
-
calculateThroughput
public long calculateThroughput(long dataSize, long time)
-