Skip to content

Commit

Permalink
fix: bps conv (should be 1000 not 1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyxdd committed Nov 19, 2023
1 parent cccb955 commit 6d6a26b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/internal/utils/bpsconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
)

const (
Byte = 1.0 << (10 * iota)
Kilobyte
Megabyte
Gigabyte
Terabyte
Byte = 1
Kilobyte = Byte * 1000
Megabyte = Kilobyte * 1000
Gigabyte = Megabyte * 1000
Terabyte = Gigabyte * 1000
)

// StringToBps converts a string to a bandwidth value in bytes per second.
Expand Down

0 comments on commit 6d6a26b

Please sign in to comment.