diff options
author | Unknown <joe2010xtmf@163.com> | 2014-07-04 14:44:31 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-07-04 14:44:31 -0400 |
commit | 7f3015b32b27d18300c0baaf26729a89dec43985 (patch) | |
tree | 8ed105f3d6ddbe5fb280d2694140e6ddf2537d52 /routers | |
parent | 13b032f82920c78a890c66569fba372b9994b003 (diff) | |
parent | ae7f3eed78bf79eb3dfd49d4a2837fe4913ef89c (diff) | |
download | gitea-7f3015b32b27d18300c0baaf26729a89dec43985.tar.gz gitea-7f3015b32b27d18300c0baaf26729a89dec43985.zip |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'routers')
-rw-r--r-- | routers/debug/debug.go | 16 | ||||
-rw-r--r-- | routers/debug/ignored.go | 11 |
2 files changed, 27 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)
+}
diff --git a/routers/debug/ignored.go b/routers/debug/ignored.go new file mode 100644 index 0000000000..4ec49964b7 --- /dev/null +++ b/routers/debug/ignored.go @@ -0,0 +1,11 @@ +// +build !pprof
+
+package debug
+
+import (
+ "github.com/go-martini/martini"
+)
+
+func RegisterRoutes(r martini.Router) {
+ // do nothing
+}
|