From ba315d1113588b98eb372ee7a52356e51be16234 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Sat, 3 Feb 2018 15:40:06 +0200 Subject: [PATCH] Enable pprof --- cmd/fluxd/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/fluxd/main.go b/cmd/fluxd/main.go index feb04cbd0..ec4098008 100644 --- a/cmd/fluxd/main.go +++ b/cmd/fluxd/main.go @@ -4,6 +4,7 @@ import ( "fmt" "io/ioutil" "net/http" + _ "net/http/pprof" "os" "os/exec" "os/signal" @@ -335,7 +336,7 @@ func main() { // HTTP transport component, for metrics go func() { - mux := http.NewServeMux() + mux := http.DefaultServeMux mux.Handle("/metrics", promhttp.Handler()) handler := daemonhttp.NewHandler(daemonRef, daemonhttp.NewRouter()) mux.Handle("/api/flux/", http.StripPrefix("/api/flux", handler))