don't check ewma n
same reason as in 4ed749d93cec77d5b9b1b8ee37ff3ae8f611f3e2
Vladimir Bauer
2 years ago
| 245 | 245 | } |
| 246 | 246 | select { |
| 247 | 247 | case b.operateState <- func(s *bState) { |
| 248 | if n := current - s.current; n > 0 { | |
| 249 | s.decoratorEwmaUpdate(n, iterDur) | |
| 250 | } | |
| 248 | s.decoratorEwmaUpdate(current-s.current, iterDur) | |
| 251 | 249 | s.current = current |
| 252 | 250 | if s.triggerComplete && s.current >= s.total { |
| 253 | 251 | s.current = s.total |