mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
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:
committed by
Dan Christian Bogos
parent
435ba54743
commit
b0758d082d
@@ -54,7 +54,6 @@ var (
|
||||
version = cgrEngineFlags.Bool(utils.VersionCgr, false, "Print application version and exit")
|
||||
printConfig = cgrEngineFlags.Bool(utils.PrintCfgCgr, false, "Print configuration object in JSON format")
|
||||
pidFile = cgrEngineFlags.String(utils.PidCgr, utils.EmptyString, "Path to write the PID file")
|
||||
httpPprof = cgrEngineFlags.Bool(utils.HttpPprofCgr, false, "Enable HTTP pprof profiling")
|
||||
cpuProfDir = cgrEngineFlags.String(utils.CpuProfDirCgr, utils.EmptyString, "Directory for CPU profiles")
|
||||
memProfDir = cgrEngineFlags.String(utils.MemProfDirCgr, utils.EmptyString, "Directory for memory profiles")
|
||||
memProfInterval = cgrEngineFlags.Duration(utils.MemProfIntervalCgr, 15*time.Second, "Interval between memory profile saves")
|
||||
@@ -548,10 +547,6 @@ func main() {
|
||||
if cfg.ConfigSCfg().Enabled {
|
||||
server.RegisterHttpFunc(cfg.ConfigSCfg().URL, config.HandlerConfigS)
|
||||
}
|
||||
if *httpPprof {
|
||||
server.RegisterProfiler()
|
||||
utils.Logger.Info("<HTTP> registered profiling endpoints at '/debug/pprof/'")
|
||||
}
|
||||
|
||||
// Define internal connections via channels
|
||||
filterSChan := make(chan *engine.FilterS, 1)
|
||||
|
||||
@@ -63,13 +63,6 @@ func TestCgrEngineFlags(t *testing.T) {
|
||||
defaultVal: "",
|
||||
want: "/run/cgrates/cgrates.pid",
|
||||
},
|
||||
{
|
||||
name: "httpPprof",
|
||||
flags: []string{"-http_pprof"},
|
||||
flagVar: httpPprof,
|
||||
defaultVal: false,
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "cpuProfDir",
|
||||
flags: []string{"-cpuprof_dir", "/tmp/profiling"},
|
||||
|
||||
Reference in New Issue
Block a user