debug.go 329 B

12345678910111213141516
  1. // +build pprof
  2. package debug
  3. import (
  4. "net/http/pprof"
  5. "github.com/go-martini/martini"
  6. )
  7. func RegisterRoutes(r martini.Router) {
  8. r.Any("/debug/pprof/cmdline", pprof.Cmdline)
  9. r.Any("/debug/pprof/profile", pprof.Profile)
  10. r.Any("/debug/pprof/symbol", pprof.Symbol)
  11. r.Any("/debug/pprof/**", pprof.Index)
  12. }