diff options
Diffstat (limited to 'routers/dev')
-rw-r--r-- | routers/dev/debug.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/routers/dev/debug.go b/routers/dev/debug.go new file mode 100644 index 0000000000..62022146ad --- /dev/null +++ b/routers/dev/debug.go @@ -0,0 +1,18 @@ +// Copyright 2014 The Gogs Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package dev
+
+import (
+ "net/http/pprof"
+
+ "github.com/go-martini/martini"
+)
+
+func RegisterDebugRoutes(r martini.Router) {
+ r.Any("/debug/pprof/cmdline", pprof.Cmdline)
+ r.Any("/debug/pprof/profile", pprof.Profile)
+ r.Any("/debug/pprof/symbol", pprof.Symbol)
+ r.Any("/debug/pprof/**", pprof.Index)
+}
|