Skip to content

Commit

Permalink
add pprof
Browse files Browse the repository at this point in the history
Signed-off-by: Alexy Mantha <alexy@mantha.dev>
  • Loading branch information
alexymantha committed May 31, 2024
1 parent 0895ebc commit 3d7fa0e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
"github.com/argoproj/argo-cd/v2/util/profile"
"github.com/argoproj/argo-cd/v2/util/tls"

"github.com/argoproj/argo-cd/v2/applicationset/controllers"
Expand Down Expand Up @@ -266,6 +267,7 @@ func NewCommand() *cobra.Command {
func startWebhookServer(webhookHandler *webhook.WebhookHandler, webhookAddr string) {
mux := http.NewServeMux()
mux.HandleFunc("/api/webhook", webhookHandler.Handler)
profile.RegisterProfiler(mux)
go func() {
log.Info("Starting webhook server")
err := http.ListenAndServe(webhookAddr, mux)
Expand Down

0 comments on commit 3d7fa0e

Please sign in to comment.