mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-10 12:01:18 +00:00
Add Monitor.SetREMA()
This commit is contained in:
@ -72,6 +72,14 @@ func (m *Monitor) Update(n int) int {
|
||||
return n
|
||||
}
|
||||
|
||||
// Hack to set the current rEMA.
|
||||
func (m *Monitor) SetREMA(rEMA float64) {
|
||||
m.mu.Lock()
|
||||
m.rEMA = rEMA
|
||||
m.samples++
|
||||
m.mu.Unlock()
|
||||
}
|
||||
|
||||
// IO is a convenience method intended to wrap io.Reader and io.Writer method
|
||||
// execution. It calls m.Update(n) and then returns (n, err) unmodified.
|
||||
func (m *Monitor) IO(n int, err error) (int, error) {
|
||||
|
Reference in New Issue
Block a user