Rate returns the per-second rate.
()
| 28 | |
| 29 | // Rate returns the per-second rate. |
| 30 | func (r *EwmaRate) Rate() float64 { |
| 31 | r.mutex.RLock() |
| 32 | defer r.mutex.RUnlock() |
| 33 | return r.lastRate |
| 34 | } |
| 35 | |
| 36 | // Tick assumes to be called every r.interval. |
| 37 | func (r *EwmaRate) Tick() { |
no outgoing calls