Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
Signed-off-by: ipsum-0320 <trueman.0320@zju.edu.cn>
  • Loading branch information
ipsum-0320 committed Oct 15, 2024
1 parent 06530fe commit dcb8056
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scheduler/core/spreadconstraint/group_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ func (info *GroupClustersInfo) calcGroupScore(clusters []ClusterDetailInfo, rbSp
// Group Score = sum(Cluster Score × Weight)
var score int64
for _, cluster := range clusters {
score += info.calcWight(cluster, rbSpec)
score += cluster.Score * info.calcWight(cluster, rbSpec)
}
return score
return score / int64(len(clusters))
}

func (info *GroupClustersInfo) generateClustersInfo(clustersScore framework.ClusterScoreList, rbSpec *workv1alpha2.ResourceBindingSpec) {
Expand Down

0 comments on commit dcb8056

Please sign in to comment.