Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Update glide.lock and routes
Browse files Browse the repository at this point in the history
  • Loading branch information
kindermoumoute committed Nov 8, 2016
1 parent bb06420 commit 4152004
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions mgmt/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,33 +510,37 @@ func (s *Server) addRoutes() {

// profiling tools routes
if s.pprof {
s.r.GET("/v1/debug/pprof/", s.index)
s.r.GET("/v1/debug/pprof/cmdline", s.cmdline)
s.r.GET("/v1/debug/pprof/profile", s.profile)
s.r.GET("/v1/debug/pprof/symbol", s.symbol)
s.r.GET("/v1/debug/pprof/trace", s.trace)
s.r.GET("/debug/pprof/", s.index)
s.r.GET("/debug/pprof/block", s.index)
s.r.GET("/debug/pprof/goroutine", s.index)
s.r.GET("/debug/pprof/heap", s.index)
s.r.GET("/debug/pprof/threadcreate", s.index)
s.r.GET("/debug/pprof/cmdline", s.cmdline)
s.r.GET("/debug/pprof/profile", s.profile)
s.r.GET("/debug/pprof/symbol", s.symbol)
s.r.GET("/debug/pprof/trace", s.trace)
}
}

// profiling tools handlers

func (s *Server) index(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
func (s *Server) index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
pprof.Index(w, r)
}

func (s *Server) cmdline(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
func (s *Server) cmdline(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
pprof.Cmdline(w, r)
}

func (s *Server) profile(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
func (s *Server) profile(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
pprof.Profile(w, r)
}

func (s *Server) symbol(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
func (s *Server) symbol(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
pprof.Symbol(w, r)
}

func (s *Server) trace(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
func (s *Server) trace(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
pprof.Trace(w, r)
}

Expand Down

0 comments on commit 4152004

Please sign in to comment.