Skip to content

Commit

Permalink
Add pprof for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shawn1m committed Jun 21, 2020
1 parent f4ecdaf commit d5c127b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/inbound/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"net"
"net/http"
"net/http/pprof"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -130,6 +131,11 @@ func (s *Server) Run() {

if s.debugHttpAddress != "" {
s.HTTPMux.HandleFunc("/cache", s.DumpCache)
s.HTTPMux.HandleFunc("/debug/pprof/", pprof.Index)
s.HTTPMux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
s.HTTPMux.HandleFunc("/debug/pprof/profile", pprof.Profile)
s.HTTPMux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
s.HTTPMux.HandleFunc("/debug/pprof/trace", pprof.Trace)

wg.Add(1)
go func() {
Expand Down

0 comments on commit d5c127b

Please sign in to comment.