mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
run gofumpt cleanup across code-base (#14015)
This commit is contained in:
@@ -111,6 +111,7 @@ func (m *Monitor) getReport(selectBucket SelectionFunction) *madmin.BucketBandwi
|
||||
}
|
||||
return report
|
||||
}
|
||||
|
||||
func (m *Monitor) trackEWMA() {
|
||||
for {
|
||||
select {
|
||||
|
||||
@@ -80,7 +80,8 @@ func TestMonitor_GetReport(t *testing.T) {
|
||||
want2: &madmin.BucketBandwidthReport{
|
||||
BucketStats: map[string]madmin.BandwidthDetails{"bucket": {
|
||||
LimitInBytesPerSecond: 1024 * 1024,
|
||||
CurrentBandwidthInBytesPerSecond: exponentialMovingAverage(betaBucket, float64(oneMiB), 2*float64(oneMiB))}},
|
||||
CurrentBandwidthInBytesPerSecond: exponentialMovingAverage(betaBucket, float64(oneMiB), 2*float64(oneMiB)),
|
||||
}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
|
||||
need = 1 // to ensure we read at least one byte for every Read
|
||||
tokens = b
|
||||
}
|
||||
|
||||
} else { // all tokens go towards payload
|
||||
need = int(math.Min(float64(b), float64(need)))
|
||||
tokens = need
|
||||
|
||||
Reference in New Issue
Block a user