diff options
Diffstat (limited to 'routers/debug/debug.go')
-rw-r--r-- | routers/debug/debug.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/routers/debug/debug.go b/routers/debug/debug.go new file mode 100644 index 0000000000..c332dbea7d --- /dev/null +++ b/routers/debug/debug.go @@ -0,0 +1,16 @@ +// +build pprof
+
+package debug
+
+import (
+ "net/http/pprof"
+
+ "github.com/go-martini/martini"
+)
+
+func RegisterRoutes(r martini.Router) {
+ r.Get("/debug/pprof/cmdline", pprof.Cmdline)
+ r.Get("/debug/pprof/profile", pprof.Profile)
+ r.Get("/debug/pprof/symbol", pprof.Symbol)
+ r.Get("/debug/pprof/**", pprof.Index)
+}
|