Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for NormalizeScore (0.52 sec)

  1. pkg/scheduler/framework/plugins/interpodaffinity/scoring.go

    	for tpKey, tpValues := range s.topologyScore {
    		if v, exist := node.Labels[tpKey]; exist {
    			score += tpValues[v]
    		}
    	}
    
    	return score, nil
    }
    
    // NormalizeScore normalizes the score for each filteredNode.
    func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	s, err := getPreScoreState(cycleState)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go

    	}
    
    	score := int64(countIntolerableTaintsPreferNoSchedule(node.Spec.Taints, s.tolerationsPreferNoSchedule))
    	return score, nil
    }
    
    // NormalizeScore invoked after scoring all nodes.
    func (pl *TaintToleration) NormalizeScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	return helper.DefaultNormalizeScore(framework.MaxNodeScore, true, scores)
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/podtopologyspread/scoring.go

    			}
    			score += scoreForCount(cnt, c.MaxSkew, s.TopologyNormalizingWeight[i])
    		}
    	}
    	return int64(math.Round(score)), nil
    }
    
    // NormalizeScore invoked after scoring all nodes.
    func (pl *PodTopologySpread) NormalizeScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	s, err := getPreScoreState(cycleState)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go

    		}
    	}
    
    	if s.preferredNodeAffinity != nil {
    		count += s.preferredNodeAffinity.Score(node)
    	}
    
    	return count, nil
    }
    
    // NormalizeScore invoked after scoring all nodes.
    func (pl *NodeAffinity) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
    	return helper.DefaultNormalizeScore(framework.MaxNodeScore, false, scores)
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 12:00:10 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/interface.go

    }
    
    // ScoreExtensions is an interface for Score extended functionality.
    type ScoreExtensions interface {
    	// NormalizeScore is called for all node scores produced by the same plugin's "Score"
    	// method. A successful run of NormalizeScore will update the scores list and return
    	// a success status.
    	NormalizeScore(ctx context.Context, state *CycleState, p *v1.Pod, scores NodeScoreList) *Status
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go

    				}
    				gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score})
    			}
    
    			status = p.(framework.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList)
    			if !status.IsSuccess() {
    				t.Errorf("unexpected error from NormalizeScore: %v", status)
    			}
    
    			if diff := cmp.Diff(test.expectedList, gotList); diff != "" {
    				t.Errorf("node score list doesn't match (-want,+got): \n %s", diff)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 44.8K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/runtime/framework_test.go

    					},
    				},
    			},
    			// scorePlugin1 Score returns 1, weight =1, so want=1.
    			// scoreWithNormalizePlugin1 Score returns 3, but NormalizeScore overrides to 4, weight=1, so want=4.
    			// scoreWithNormalizePlugin2 Score returns 4, but NormalizeScore overrides to 5, weight=2, so want=10.
    			want: []framework.NodePluginScores{
    				{
    					Name: "node1",
    					Scores: []framework.PluginScore{
    						{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    					t.Errorf("unexpected error: %v", status)
    				}
    				gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score})
    			}
    
    			status = p.(framework.ScorePlugin).ScoreExtensions().NormalizeScore(ctx, state, test.pod, gotList)
    			if !status.IsSuccess() {
    				t.Errorf("unexpected error: %v", status)
    			}
    
    			if !reflect.DeepEqual(test.expectedList, gotList) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/runtime/framework.go

    	if !state.ShouldRecordPluginMetrics() {
    		return pl.ScoreExtensions().NormalizeScore(ctx, state, pod, nodeScoreList)
    	}
    	startTime := time.Now()
    	status := pl.ScoreExtensions().NormalizeScore(ctx, state, pod, nodeScoreList)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 60.9K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go

    				if !status.IsSuccess() {
    					t.Errorf("unexpected error: %v", status)
    				}
    				gotList = append(gotList, framework.NodeScore{Name: nodeName, Score: score})
    			}
    
    			status = p.NormalizeScore(ctx, state, tt.pod, gotList)
    			if !status.IsSuccess() {
    				t.Errorf("unexpected error: %v", status)
    			}
    			if diff := cmp.Diff(tt.want, gotList, cmpOpts...); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 60K bytes
    - Viewed (0)
Back to top