Skip to content

Commit 9ece180

Browse files
committed
fix log perf issue
Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent 00f61d0 commit 9ece180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/epp/scheduling/framework/plugins/picker/weighted_random_picker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ func (p *WeightedRandomPicker) Pick(ctx context.Context, cycleState *types.Cycle
111111
return p.randomPicker.Pick(ctx, cycleState, scoredPods)
112112
}
113113

114-
log.FromContext(ctx).V(logutil.DEBUG).Info(fmt.Sprintf("Selecting maximum '%d' pods from %d candidates using weighted random sampling: %+v",
115-
p.maxNumOfEndpoints, len(scoredPods), scoredPods))
114+
log.FromContext(ctx).V(logutil.DEBUG).Info("Selecting pods from candidates by random weighted picker", "max-num-of-endpoints", p.maxNumOfEndpoints,
115+
"num-of-candidates", len(scoredPods), "scored-pods", scoredPods)
116116

117117
randomGenerator := rand.New(rand.NewSource(time.Now().UnixNano()))
118118

0 commit comments

Comments
 (0)