[#68] Add go pprof to neofs-storage

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-02 16:18:38 +03:00 committed by Alex Vanin
parent 69a69cdbee
commit 2ee24998ba
3 changed files with 29 additions and 0 deletions

15
cmd/neofs-node/pprof.go Normal file
View file

@ -0,0 +1,15 @@
package main
import (
"github.com/nspcc-dev/neofs-node/pkg/util/profiler"
)
func initProfiler(c *cfg) {
c.profiler = profiler.NewProfiler(c.log, c.viper)
}
func serveProfiler(c *cfg) {
if c.profiler != nil {
c.profiler.Start(c.ctx)
}
}