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 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)