Improve scheduler's performance by eliminating sorting when finding the host with the highest score

This commit is contained in:
Bobby (Babak) Salamat
2018-06-22 19:13:44 -07:00
parent 5e9a5659b7
commit ffc8cc2f50
2 changed files with 20 additions and 10 deletions

View File

@@ -454,7 +454,7 @@ func TestGenericSchedulerWithExtenders(t *testing.T) {
// because of the errors from errorPredicateExtender and/or
// errorPrioritizerExtender.
predicates: map[string]algorithm.FitPredicate{"true": truePredicate},
prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}},
prioritizers: []algorithm.PriorityConfig{{Function: machine2Prioritizer, Weight: 1}},
extenders: []FakeExtender{
{
predicates: []fitPredicate{errorPredicateExtender},