Class ThroughputCalculator
- java.lang.Object
-
- org.apache.flink.runtime.throughput.ThroughputCalculator
-
public class ThroughputCalculator extends Object
Class for measuring the throughput based on incoming data size and measurement period.
-
-
Constructor Summary
Constructors Constructor Description ThroughputCalculator(org.apache.flink.util.clock.Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcalculateThroughput()longcalculateThroughput(long dataSize, long time)voidincomingDataSize(long receivedDataSize)voidpauseMeasurement()Mark when the time should not be taken into account.voidresumeMeasurement()Mark when the time should be included to the throughput calculation.
-
-
-
Method Detail
-
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)
-
-