MCPcopy Create free account
hub / github.com/cloudwan/gohan / addPprofRoutes

Method addPprofRoutes

server/server.go:134–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132}
133
134func (server *Server) addPprofRoutes() {
135 server.martini.Group("/debug/pprof", func(r martini.Router) {
136 r.Any("/", pprof.Index)
137 r.Any("/cmdline", pprof.Cmdline)
138 r.Any("/profile", pprof.Profile)
139 r.Any("/symbol", pprof.Symbol)
140 r.Any("/trace", pprof.Trace)
141 r.Any("/block", pprof.Handler("block").ServeHTTP)
142 r.Any("/heap", pprof.Handler("heap").ServeHTTP)
143 r.Any("/mutex", pprof.Handler("mutex").ServeHTTP)
144 r.Any("/goroutine", pprof.Handler("goroutine").ServeHTTP)
145 r.Any("/threadcreate", pprof.Handler("threadcreate").ServeHTTP)
146 })
147}
148
149func (server *Server) resetRouter() {
150 router := martini.NewRouter()

Callers 1

NewServerFunction · 0.95

Calls 1

AnyMethod · 0.80

Tested by

no test coverage detected