Use a sliding window to track failures / successes

This will give better error rate reporting.