Skip to content

Commit

Permalink
discovery: check number of goroutines
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Grisonnet <[email protected]>
  • Loading branch information
dgrisonnet committed Oct 15, 2024
1 parent f3b7593 commit 315618f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package discovery
import (
"context"
"fmt"
"runtime"
"time"

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down Expand Up @@ -252,8 +253,9 @@ func (r *CRDiscoverer) PollForCacheUpdates(
shouldGenerateMetrics = r.WasUpdated
})
if shouldGenerateMetrics {
klog.InfoS("should generate metrics", "goroutine", runtime.NumGoroutine())
generateMetrics()
klog.InfoS("discovery finished, cache updated")
klog.InfoS("discovery finished, cache updated", "goroutine", runtime.NumGoroutine())
}
}
}
Expand Down

0 comments on commit 315618f

Please sign in to comment.