forked from TrueCloudLab/frostfs-node
[#68] Add go pprof to neofs-storage
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
69a69cdbee
commit
2ee24998ba
3 changed files with 29 additions and 0 deletions
15
cmd/neofs-node/pprof.go
Normal file
15
cmd/neofs-node/pprof.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue