17 lines
376 B
Go
17 lines
376 B
Go
//go:build pprof
|
|
// +build pprof
|
|
|
|
package server
|
|
|
|
import (
|
|
"net/http/pprof"
|
|
)
|
|
|
|
func (s *Server) installPprof() {
|
|
r := s.r
|
|
r.HandleFunc("/debug/pprof/", pprof.Index)
|
|
r.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
|
|
r.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
|
r.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
|
|
r.HandleFunc("/debug/pprof/trace", pprof.Trace)
|
|
}
|