add pprof endpoints

This commit is contained in:
Andre Medeiros 2022-08-08 12:48:34 -04:00
parent 13af0d1b4a
commit 01a4ae9559

View file

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