summaryrefslogtreecommitdiffstats
path: root/routers/dev
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-07-06 18:25:07 -0400
committerUnknown <joe2010xtmf@163.com>2014-07-06 18:25:07 -0400
commit7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3 (patch)
tree86b6d5e3c6fb71452bf6db68af7987d149805a16 /routers/dev
parent9b014d05e4c656d023e57d61af370bc8d8f20216 (diff)
downloadgitea-7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3.tar.gz
gitea-7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3.zip
Move debug router location
Diffstat (limited to 'routers/dev')
-rw-r--r--routers/dev/debug.go18
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)
+}