percentileFrameBytes method
Linear-interpolation percentile (q in [0, 100]) of
Vp8FrameStats.bytesEmitted over the most recent up to
rollingWindowFrames non-dropped frames. Returns 0.0 when
rolling stats are disabled or the window is empty. Uses the
standard "linear interpolation between closest ranks" definition:
rank = q/100 * (n-1).
Implementation
double percentileFrameBytes(double q) {
_validatePercentile(q);
if (_ringFill == 0) return 0.0;
final s = List<int>.generate(_ringFill, (i) => _ringBytes[i])..sort();
return _interpPercentileInt(s, q);
}