From 4152004b1eccef01feab533d6c0c69aa2f17cef3 Mon Sep 17 00:00:00 2001 From: kindermoumoute Date: Thu, 3 Nov 2016 14:39:42 -0700 Subject: [PATCH] Update glide.lock and routes --- glide.lock | 2 +- mgmt/rest/server.go | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/glide.lock b/glide.lock index 0d77e6511..ffcb4df4e 100644 --- a/glide.lock +++ b/glide.lock @@ -49,7 +49,7 @@ imports: - name: github.com/intelsdi-x/gomit version: db68f6fda248706a71980abc58e969fcd63f5ea6 - name: github.com/intelsdi-x/snap-plugin-lib-go - version: d7be15167858210a70ff958a5844acd93f68d989 + version: d54f454f345cd2f3579784ae8ffd07add438b402 subpackages: - v1/plugin - v1/plugin/rpc diff --git a/mgmt/rest/server.go b/mgmt/rest/server.go index d973599f4..56030e31c 100644 --- a/mgmt/rest/server.go +++ b/mgmt/rest/server.go @@ -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) }