From 01a4ae95590187f629d4f237dbef90c34c70aa2a Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 8 Aug 2022 12:48:34 -0400 Subject: [PATCH] add pprof endpoints --- internal/cmd/root.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 624bbcc..ea9a0b2 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -2,6 +2,8 @@ package cmd import ( "context" + "net/http" + _ "net/http/pprof" "os" "runtime" "runtime/pprof" @@ -67,6 +69,10 @@ func Execute(ctx context.Context) int { rootCmd.AddCommand(SchedulerCmd(ctx)) rootCmd.AddCommand(WorkerCmd(ctx)) + go func() { + _ = http.ListenAndServe("localhost:6060", nil) + }() + if err := rootCmd.Execute(); err != nil { return 1 }