Skip to content

Commit f34f371

Browse files
authored
add debug HTTP pprof (#208)
1 parent cb4e2b1 commit f34f371

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

river/status.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import (
55
"fmt"
66
"net"
77
"net/http"
8+
"net/http/pprof"
89

9-
log "github.com/sirupsen/logrus"
1010
"github.com/siddontang/go/sync2"
11+
log "github.com/sirupsen/logrus"
1112
)
1213

1314
type stat struct {
@@ -60,6 +61,7 @@ func (s *stat) Run(addr string) {
6061
srv := http.Server{}
6162
mux := http.NewServeMux()
6263
mux.Handle("/stat", s)
64+
mux.Handle("/debug/pprof", http.HandlerFunc(pprof.Index))
6365
srv.Handler = mux
6466

6567
srv.Serve(s.l)

0 commit comments

Comments
 (0)