erigon-pulse/common/experiments.go
Alex Sharov a8ce14e8cc
option to disable runtime.ReadMemStats (#457)
* save

* save

* save

* save
2022-05-19 11:46:55 +07:00

22 lines
241 B
Go

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)
}
}