rename memoryUnits

It's not just used for memory sizes.
This commit is contained in:
Joey Hess 2022-05-05 15:35:11 -04:00
parent d1cce869ed
commit 8675b2b075
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 10 additions and 10 deletions

View file

@ -491,14 +491,14 @@ bandwidthMeter mtotalsize (MeterState (BytesProcessed old) before) (MeterState (
, estimatedcompletion
]
where
amount = roughSize' memoryUnits True 2 new
amount = roughSize' committeeUnits True 2 new
percentamount = case mtotalsize of
Just (TotalSize totalsize) ->
let p = showPercentage 0 $
percentage totalsize (min new totalsize)
in p ++ replicate (6 - length p) ' ' ++ amount
Nothing -> amount
rate = roughSize' memoryUnits True 0 bytespersecond ++ "/s"
rate = roughSize' committeeUnits True 0 bytespersecond ++ "/s"
bytespersecond
| duration == 0 = fromIntegral transferred
| otherwise = floor $ fromIntegral transferred / duration