Class: CB2::Percentage
- Inherits:
-
RollingWindow
- Object
- RollingWindow
- CB2::Percentage
- Defined in:
- lib/cb2/strategies/percentage.rb
Instance Attribute Summary
Attributes inherited from RollingWindow
#duration, #redis, #reenable_after, #service, #threshold
Instance Method Summary collapse
-
#count ⇒ Object
keep a rolling window of all calls too.
Methods inherited from RollingWindow
#error, #half_open?, #initialize, #key, #last_open, #open?, #reset!, #success, #trip!
Constructor Details
This class inherits a constructor from CB2::RollingWindow
Instance Method Details
#count ⇒ Object
keep a rolling window of all calls too
3 4 5 |
# File 'lib/cb2/strategies/percentage.rb', line 3 def count @current_count = increment_rolling_window(key("count")) end |