Added a new unit 32kB

This commit is contained in:
Hang Sun 2018-02-27 10:12:55 -08:00 committed by Will Rouesnel
parent 4df26a0922
commit 2db8b47fe8
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,7 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
return
case "ms", "s", "min", "h", "d":
unit = "seconds"
case "kB", "MB", "GB", "TB", "8kB", "16kB", "16MB":
case "kB", "MB", "GB", "TB", "8kB", "16kB", "32kB", "16MB":
unit = "bytes"
default:
err = fmt.Errorf("Unknown unit for runtime variable: %q", s.unit)
@ -129,6 +129,8 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
val *= math.Pow(2, 13)
case "16kB":
val *= math.Pow(2, 14)
case "32kB":
val *= math.Pow(2, 15)
case "16MB":
val *= math.Pow(2, 24)
}