Skip to content

Commit

Permalink
Merge pull request #195 from foomo/fix-pprof
Browse files Browse the repository at this point in the history
fix: pprof
  • Loading branch information
franklinkim authored Dec 7, 2023
2 parents bbd9088 + 4ac67ce commit eaefba2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/httppprof_pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ const (
DefaultHTTPPProfPath = "/debug/pprof"
)

func NewHTTPPProf(l *zap.Logger, name, addr, path string) *ServiceHTTP {
func NewHTTPPProf(l *zap.Logger, name, addr, path string) *HTTP {
handler := http.NewServeMux()
handler.HandleFunc(path+"/", pprof.Index)
handler.HandleFunc(path+"/cmdline", pprof.Cmdline)
handler.HandleFunc(path+"/profile", pprof.Profile)
handler.HandleFunc(path+"/symbol", pprof.Symbol)
handler.HandleFunc(path+"/trace", pprof.Trace)
return NewServiceHTTP(l, name, addr, handler)
return NewHTTP(l, name, addr, handler)
}

func NewDefaultHTTPPProf() *ServiceHTTP {
func NewDefaultHTTPPProf() *HTTP {
return NewHTTPPProf(
log.Logger(),
DefaultHTTPPProfName,
Expand Down

0 comments on commit eaefba2

Please sign in to comment.