Skip to content

Commit

Permalink
tmp: make node score fields public so they're actually logged
Browse files Browse the repository at this point in the history
  • Loading branch information
sharnoff committed Dec 12, 2024
1 parent d987506 commit 7a60333
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/plugin/framework_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ func (e *AutoscaleEnforcer) NormalizeScore(
)

type scoring struct {
node string
oldScore int64
newScore int64
Node string
OldScore int64
NewScore int64
}

var scoreInfos []scoring
Expand All @@ -533,9 +533,9 @@ func (e *AutoscaleEnforcer) NormalizeScore(
// rand.Intn will panic if we pass in 0
if oldScore == 0 {
scoreInfos = append(scoreInfos, scoring{
node: node.Name,
oldScore: oldScore,
newScore: node.Score,
Node: node.Name,
OldScore: oldScore,
NewScore: node.Score,
})
continue
}
Expand All @@ -550,9 +550,9 @@ func (e *AutoscaleEnforcer) NormalizeScore(
newScore := minScore + int64(rand.Intn(int(oldScore+1-minScore)))
node.Score = newScore
scoreInfos = append(scoreInfos, scoring{
node: node.Name,
oldScore: oldScore,
newScore: newScore,
Node: node.Name,
OldScore: oldScore,
NewScore: newScore,
})
}

Expand Down

0 comments on commit 7a60333

Please sign in to comment.