rollingEncodeFps property

double get rollingEncodeFps

Throughput (frames/sec) computed over the rolling window: rollingWindowFill * 1e6 / sum(encodeMicros over the window). 0.0 when rolling stats are disabled, the window is empty, or every recorded micros value in the window is zero.

Implementation

double get rollingEncodeFps {
  if (_ringFill == 0) return 0.0;
  var sum = 0;
  for (var i = 0; i < _ringFill; i++) {
    sum += _ringMicros[i];
  }
  if (sum == 0) return 0.0;
  return _ringFill * 1e6 / sum;
}