Skip to content

Commit

Permalink
feat(kprofef): enable http pprof
Browse files Browse the repository at this point in the history
On port 6060 now runs pprof

Signed-off-by: Gianluca Arbezzano <[email protected]>
  • Loading branch information
Gianluca Arbezzano committed Jan 3, 2020
1 parent 737bd33 commit a5a0874
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/kprofefe/main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
package main

import (
"log"
"os"

"net/http"
_ "net/http/pprof"

"github.com/gianarb/kube-profefe/pkg/cmd"
"go.uber.org/zap"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
)

func main() {
go func() {
log.Println(http.ListenAndServe(":6060", nil))
}()

logger, _ := zap.NewDevelopment()
rootCmd := cmd.NewKProfefeCmd(logger, genericclioptions.IOStreams{
In: os.Stdin,
Expand Down

0 comments on commit a5a0874

Please sign in to comment.