rubyist/circuitbreaker — pull request #20 by rubyist (2014-10-10 11:51:46+00:00)
Title: Error Rate Breaker

Define a breaker that trips when the error rate hits a certain threshold. It'll work like this:

* Count the number of failures
* Count the number of successes, i.e. `Reset()` calls
* Error rate is `failures / (failures + successes)`
* Reset the failure/success counts at a specified rate
* Wait for n samples before the breaker can trip