2021-03-15 13:11:40 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/util/profiler"
|
|
|
|
)
|
|
|
|
|
|
|
|
func initMetrics(c *cfg) {
|
2021-03-16 08:14:56 +00:00
|
|
|
if c.metricsCollector != nil {
|
|
|
|
c.metricsServer = profiler.NewMetrics(c.log, c.viper)
|
|
|
|
}
|
2021-03-15 13:11:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func serveMetrics(c *cfg) {
|
2021-03-16 08:14:56 +00:00
|
|
|
if c.metricsServer != nil {
|
|
|
|
c.metricsServer.Start(c.ctx)
|
2021-03-15 13:11:40 +00:00
|
|
|
}
|
|
|
|
}
|