Skip to content

Commit

Permalink
add pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet committed Mar 24, 2022
1 parent 27a54fd commit fe0ab6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/rusid/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package main
import (
"context"
"flag"
"k8s.io/klog/v2"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime/debug"
Expand All @@ -20,8 +22,6 @@ import (
"rusi/pkg/runtime"
"sync"
"time"

"k8s.io/klog/v2"
)

func main() {
Expand All @@ -32,6 +32,10 @@ func main() {
klog.InitFlags(nil)
defer klog.Flush()

go func() {
http.ListenAndServe("localhost:6060", nil)
}()

cfgBuilder := runtime.NewRuntimeConfigBuilder()
cfgBuilder.AttachCmdFlags(flag.StringVar, flag.BoolVar, flag.IntVar)
flag.Parse()
Expand Down

0 comments on commit fe0ab6d

Please sign in to comment.