1
0

add pprof support

This commit is contained in:
2023-04-07 16:54:10 +08:00
parent 9ba33d64d3
commit 586abdfd7b
2 changed files with 12 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ func main() {
flag.TextVar(&level, "log-level", zapcore.InfoLevel, "logger level")
flag.StringVar(&conf.MetricsBindAddress, "metrics-address", "127.0.0.1:8080", "The address the metric endpoint binds to.")
flag.BoolVar(&conf.LeaderElection, "enable-leader-election", false, "Enable leader election for controller manager")
flag.BoolVar(&conf.PProf, "enable-pprof", false, "Enable profile debug")
flag.Parse()
// 初始化日志格式
ctrl.SetLogger(zap.New(func(o *zap.Options) {