Comcast/jrugged — pull request #25 by jffmrk (2013-12-18 17:41:30+00:00)
Title: fix percentage failure when request threshold is configured

I discovered a bug when using requestThreshold with percentage. If a the time window passed with no requests, the first request in the next window would properly set the previousRequestWindowHighWaterMark. However, each request after that would incorrectly reset previousRequestWindowHighWaterMark to -1. This would cause the percent calculation to be incorrect as the total request count would be used as the windowRequests, but only the number of errors in the last window are used. I wrote a test to demonstrate also. Thanks!