1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/cmd/internal/profiling.go

17 lines
423 B
Go
Raw Normal View History

package internal
import (
"net"
"github.com/go-logr/logr"
"github.com/kyverno/kyverno/pkg/profiling"
)
func setupProfiling(logger logr.Logger) {
logger = logger.WithName("profiling").WithValues("enabled", profilingEnabled, "address", profilingAddress, "port", profilingPort)
if profilingEnabled {
logger.Info("setup profiling...")
profiling.Start(logger, net.JoinHostPort(profilingAddress, profilingPort))
}
}