From 7ffdabb28f65b9e4414cd19c0c1f1a400b16b1f3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 6 Jul 2014 18:25:07 -0400 Subject: Move debug router location --- routers/dev/debug.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 routers/dev/debug.go (limited to 'routers/dev') 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) +} -- cgit v1.2.3