summaryrefslogtreecommitdiffstats
path: root/api/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/server.go')
-rw-r--r--api/server.go20
1 files changed, 1 insertions, 19 deletions
diff --git a/api/server.go b/api/server.go
index fee74e373..f5a374507 100644
--- a/api/server.go
+++ b/api/server.go
@@ -7,7 +7,6 @@ import (
"crypto/tls"
"net"
"net/http"
- "net/http/pprof"
"strings"
"time"
@@ -37,20 +36,7 @@ const TIME_TO_WAIT_FOR_CONNECTIONS_TO_CLOSE_ON_SERVER_SHUTDOWN = time.Second
var Srv *Server
-func AttachProfiler(router *mux.Router) {
- router.HandleFunc("/debug/pprof/", pprof.Index)
- router.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
- router.HandleFunc("/debug/pprof/profile", pprof.Profile)
- router.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
-
- // Manually add support for paths linked to by index page at /debug/pprof/
- router.Handle("/debug/pprof/goroutine", pprof.Handler("goroutine"))
- router.Handle("/debug/pprof/heap", pprof.Handler("heap"))
- router.Handle("/debug/pprof/threadcreate", pprof.Handler("threadcreate"))
- router.Handle("/debug/pprof/block", pprof.Handler("block"))
-}
-
-func NewServer(enableProfiler bool) {
+func NewServer() {
l4g.Info(utils.T("api.server.new_server.init.info"))
@@ -58,10 +44,6 @@ func NewServer(enableProfiler bool) {
Srv.Store = store.NewSqlStore()
Srv.Router = mux.NewRouter()
- if enableProfiler {
- AttachProfiler(Srv.Router)
- l4g.Info("Enabled HTTP Profiler")
- }
Srv.Router.NotFoundHandler = http.HandlerFunc(Handle404)
}