From 7a2f9e6d1e1492c3f2502f16dea3f408e2f520d6 Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 1 Feb 2018 17:09:49 +0100 Subject: [PATCH] add debug HTTP pprof --- river/status.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/river/status.go b/river/status.go index ebfc83b3..53f7a73e 100644 --- a/river/status.go +++ b/river/status.go @@ -5,9 +5,10 @@ import ( "fmt" "net" "net/http" + "net/http/pprof" - log "github.com/sirupsen/logrus" "github.com/siddontang/go/sync2" + log "github.com/sirupsen/logrus" ) type stat struct { @@ -60,6 +61,7 @@ func (s *stat) Run(addr string) { srv := http.Server{} mux := http.NewServeMux() mux.Handle("/stat", s) + mux.Handle("/debug/pprof", http.HandlerFunc(pprof.Index)) srv.Handler = mux srv.Serve(s.l)