erigon-pulse/common/experiments.go

22 lines
241 B
Go
Raw Normal View History

package common
import (
"os"
"runtime"
)
var doMemstat = true
func init() {
_, ok := os.LookupEnv("NO_MEMSTAT")
if ok {
doMemstat = false
}
}
func ReadMemStats(m *runtime.MemStats) {
if doMemstat {
runtime.ReadMemStats(m)
}
}