Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NormalizeScore (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. pkg/scheduler/schedule_one_test.go

    	}
    	return int64(score), nil
    }
    
    func (pl *reverseNumericMapPlugin) ScoreExtensions() framework.ScoreExtensions {
    	return pl
    }
    
    func (pl *reverseNumericMapPlugin) NormalizeScore(_ context.Context, _ *framework.CycleState, _ *v1.Pod, nodeScores framework.NodeScoreList) *framework.Status {
    	var maxScore float64
    	minScore := math.MaxFloat64
    
    	for _, hostPriority := range nodeScores {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
Back to top