Browse Source

web: display GOMEMLIMIT in runtime info

Signed-off-by: Vladimir Varankin <vladimir@varank.in>
pull/12191/head
Vladimir Varankin 2 years ago
parent
commit
d281ebb178
  1. 1
      web/api/v1/api.go
  2. 2
      web/web.go

1
web/api/v1/api.go

@ -143,6 +143,7 @@ type RuntimeInfo struct {
CorruptionCount int64 `json:"corruptionCount"`
GoroutineCount int `json:"goroutineCount"`
GOMAXPROCS int `json:"GOMAXPROCS"`
GOMEMLIMIT int64 `json:"GOMEMLIMIT"`
GOGC string `json:"GOGC"`
GODEBUG string `json:"GODEBUG"`
StorageRetention string `json:"storageRetention"`

2
web/web.go

@ -29,6 +29,7 @@ import (
"path"
"path/filepath"
"runtime"
"runtime/debug"
"strconv"
"strings"
"sync"
@ -710,6 +711,7 @@ func (h *Handler) runtimeInfo() (api_v1.RuntimeInfo, error) {
CWD: h.cwd,
GoroutineCount: runtime.NumGoroutine(),
GOMAXPROCS: runtime.GOMAXPROCS(0),
GOMEMLIMIT: debug.SetMemoryLimit(-1),
GOGC: os.Getenv("GOGC"),
GODEBUG: os.Getenv("GODEBUG"),
}

Loading…
Cancel
Save