Class BufferSizeEMA


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

      • BufferSizeEMA

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

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

      • 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.