mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-29 03:06:35 -05:00
if the BPS is less than 1, report 0 (#4467)
This commit is contained in:
@@ -223,6 +223,13 @@ func emitStats(s *stats, ch chan Stats) (cancel func()) {
|
||||
smoothedFetchBPS = curFetchedBPS + weight*(newFetchedBPS-curFetchedBPS)
|
||||
}
|
||||
|
||||
if smoothedSendBPS < 1 {
|
||||
smoothedSendBPS = 0
|
||||
}
|
||||
if smoothedFetchBPS < 1 {
|
||||
smoothedFetchBPS = 0
|
||||
}
|
||||
|
||||
atomic.StoreUint64(&s.sendBytesPerSec, math.Float64bits(smoothedSendBPS))
|
||||
atomic.StoreUint64(&s.fetchedSourceBytesPerSec, math.Float64bits(smoothedFetchBPS))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user