mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[CHANGED] Profiler: Start profile_port earlier
Enables use of pprof to investigate server startup. Co-authored-by: Ivan Kozlovic <ivan@synadia.com> Signed-off-by: Ben Werthmann <ben@synadia.com>
This commit is contained in:
@@ -1541,6 +1541,11 @@ func (s *Server) Start() {
|
||||
s.grRunning = true
|
||||
s.grMu.Unlock()
|
||||
|
||||
// Pprof http endpoint for the profiler.
|
||||
if opts.ProfPort != 0 {
|
||||
s.StartProfiler()
|
||||
}
|
||||
|
||||
if opts.ConfigFile != _EMPTY_ {
|
||||
s.Noticef("Using configuration file: %s", opts.ConfigFile)
|
||||
}
|
||||
@@ -1740,11 +1745,6 @@ func (s *Server) Start() {
|
||||
})
|
||||
}
|
||||
|
||||
// Pprof http endpoint for the profiler.
|
||||
if opts.ProfPort != 0 {
|
||||
s.StartProfiler()
|
||||
}
|
||||
|
||||
if opts.PortsFileDir != _EMPTY_ {
|
||||
s.logPorts()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user