You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-11 02:43:02 +03:00
Added a new unit 32kB
This commit is contained in:
@@ -96,7 +96,7 @@ func (s *pgSetting) normaliseUnit() (val float64, unit string, err error) {
|
|||||||
return
|
return
|
||||||
case "ms", "s", "min", "h", "d":
|
case "ms", "s", "min", "h", "d":
|
||||||
unit = "seconds"
|
unit = "seconds"
|
||||||
case "kB", "MB", "GB", "TB", "8kB", "16kB", "16MB":
|
case "kB", "MB", "GB", "TB", "8kB", "16kB", "32kB", "16MB":
|
||||||
unit = "bytes"
|
unit = "bytes"
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unknown unit for runtime variable: %q", s.unit)
|
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)
|
val *= math.Pow(2, 13)
|
||||||
case "16kB":
|
case "16kB":
|
||||||
val *= math.Pow(2, 14)
|
val *= math.Pow(2, 14)
|
||||||
|
case "32kB":
|
||||||
|
val *= math.Pow(2, 15)
|
||||||
case "16MB":
|
case "16MB":
|
||||||
val *= math.Pow(2, 24)
|
val *= math.Pow(2, 24)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user