mirror of
https://github.com/prometheus/prometheus
synced 2025-04-11 03:52:13 +00:00
web: display GOMEMLIMIT in runtime info
Signed-off-by: Vladimir Varankin <vladimir@varank.in>
This commit is contained in:
parent
7cd9f8a340
commit
d281ebb178
@ -143,6 +143,7 @@ type RuntimeInfo struct {
|
|||||||
CorruptionCount int64 `json:"corruptionCount"`
|
CorruptionCount int64 `json:"corruptionCount"`
|
||||||
GoroutineCount int `json:"goroutineCount"`
|
GoroutineCount int `json:"goroutineCount"`
|
||||||
GOMAXPROCS int `json:"GOMAXPROCS"`
|
GOMAXPROCS int `json:"GOMAXPROCS"`
|
||||||
|
GOMEMLIMIT int64 `json:"GOMEMLIMIT"`
|
||||||
GOGC string `json:"GOGC"`
|
GOGC string `json:"GOGC"`
|
||||||
GODEBUG string `json:"GODEBUG"`
|
GODEBUG string `json:"GODEBUG"`
|
||||||
StorageRetention string `json:"storageRetention"`
|
StorageRetention string `json:"storageRetention"`
|
||||||
|
@ -29,6 +29,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"runtime/debug"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -710,6 +711,7 @@ func (h *Handler) runtimeInfo() (api_v1.RuntimeInfo, error) {
|
|||||||
CWD: h.cwd,
|
CWD: h.cwd,
|
||||||
GoroutineCount: runtime.NumGoroutine(),
|
GoroutineCount: runtime.NumGoroutine(),
|
||||||
GOMAXPROCS: runtime.GOMAXPROCS(0),
|
GOMAXPROCS: runtime.GOMAXPROCS(0),
|
||||||
|
GOMEMLIMIT: debug.SetMemoryLimit(-1),
|
||||||
GOGC: os.Getenv("GOGC"),
|
GOGC: os.Getenv("GOGC"),
|
||||||
GODEBUG: os.Getenv("GODEBUG"),
|
GODEBUG: os.Getenv("GODEBUG"),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user