web: display GOMEMLIMIT in runtime info

Signed-off-by: Vladimir Varankin <vladimir@varank.in>
This commit is contained in:
Vladimir Varankin 2023-03-28 20:47:18 +02:00
parent 7cd9f8a340
commit d281ebb178
2 changed files with 3 additions and 0 deletions

View file

@ -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"),
}