mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 17:13:22 +00:00
Add mutex and block profiling via envvar
This commit is contained in:
parent
78205b76e9
commit
fffe51fb03
@ -22,6 +22,7 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
@ -64,6 +65,11 @@ func init() {
|
||||
}
|
||||
|
||||
func main() {
|
||||
if os.Getenv("DEBUG") != "" {
|
||||
runtime.SetBlockProfileRate(20)
|
||||
runtime.SetMutexProfileFraction(20)
|
||||
}
|
||||
|
||||
cfg := struct {
|
||||
printVersion bool
|
||||
configFile string
|
||||
|
Loading…
Reference in New Issue
Block a user