debug.go 479 B

123456789101112131415161718
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package dev
  5. import (
  6. "net/http/pprof"
  7. "github.com/go-martini/martini"
  8. )
  9. func RegisterDebugRoutes(r martini.Router) {
  10. r.Any("/debug/pprof/cmdline", pprof.Cmdline)
  11. r.Any("/debug/pprof/profile", pprof.Profile)
  12. r.Any("/debug/pprof/symbol", pprof.Symbol)
  13. r.Any("/debug/pprof/**", pprof.Index)
  14. }