Class BufferSizeEMA

java.lang.Object
org.apache.flink.runtime.throughput.BufferSizeEMA

public class BufferSizeEMA extends Object
Implementation of 'Exponential moving average' algorithm.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferSizeEMA(int startingBufferSize, int maxBufferSize, int minBufferSize, long numberOfSamples)
     
    BufferSizeEMA(int maxBufferSize, int minBufferSize, long numberOfSamples)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    calculateBufferSize(long totalBufferSizeInBytes, int totalBuffers)
    Calculating the buffer size over total possible buffers size and number of buffers in use.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BufferSizeEMA

      public BufferSizeEMA(int maxBufferSize, int minBufferSize, long numberOfSamples)
    • BufferSizeEMA

      public BufferSizeEMA(int startingBufferSize, int maxBufferSize, int minBufferSize, long numberOfSamples)
  • Method Details

    • calculateBufferSize

      public int calculateBufferSize(long totalBufferSizeInBytes, int totalBuffers)
      Calculating the buffer size over total possible buffers size and number of buffers in use.
      Parameters:
      totalBufferSizeInBytes - Total buffers size.
      totalBuffers - Total number of buffers in use.
      Returns:
      Throughput calculated according to implemented algorithm.