Remove redundant http_pprof cgr-engine flag

runtime profiling is now configurable within the http cfg section and
is enabled by default
This commit is contained in:
ionutboangiu
2024-08-09 20:28:12 +03:00
committed by Dan Christian Bogos
parent 435ba54743
commit b0758d082d
5 changed files with 0 additions and 38 deletions

View File

@@ -188,19 +188,6 @@ func (s *Server) handleRequest(w http.ResponseWriter, r *http.Request) {
io.Copy(w, res)
}
func registerProfiler(mux *http.ServeMux) {
mux.HandleFunc("/debug/pprof/", pprof.Index)
mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
}
func (s *Server) RegisterProfiler() {
registerProfiler(s.httpMux)
registerProfiler(s.httpsMux)
}
func (s *Server) ServeHTTP(addr, jsonRPCURL, wsRPCURL, promURL, pprofPath string, useBasicAuth bool,
userList map[string]string, shdChan *utils.SyncedChan) {
s.RLock()

View File

@@ -95,17 +95,6 @@ func TestRegisterHttpFunc(t *testing.T) {
rcv.StopBiRPC()
}
func TestRegisterProfiler(t *testing.T) {
cfgDflt := config.NewDefaultCGRConfig()
cfgDflt.CoreSCfg().CapsStatsInterval = 1
caps := engine.NewCaps(0, utils.MetaBusy)
rcv := NewServer(caps)
rcv.RegisterProfiler()
rcv.StopBiRPC()
}
func TestHandleRequestCORSHeaders(t *testing.T) {
caps := engine.NewCaps(0, utils.MetaBusy)
rcv := NewServer(caps)