Fail loudly on a touch read, stop the workers before their sockets close, and file down the small edges
This commit is contained in:
@@ -75,8 +75,10 @@ func commas(v uint64) string {
|
||||
// on the label. Below a thousand no letter is left dangling, since a trailing
|
||||
// space would push the figure off centre.
|
||||
func scaleSI(v float64) string {
|
||||
// %.2f rounds 999.995 and up to a fourth digit, so the magnitude rolls over
|
||||
// where the rounding does rather than at the bare thousand.
|
||||
for _, mag := range []string{"", "k", "M", "G", "T"} {
|
||||
if v < 1000 {
|
||||
if v < 999.995 {
|
||||
if mag == "" {
|
||||
return fmt.Sprintf("%.2f", v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user