Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for nodeScoreList (0.18 sec)

  1. pkg/scheduler/framework/plugins/helper/normalize_score_test.go

    		},
    	}
    
    	for i, test := range tests {
    		t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) {
    			scores := framework.NodeScoreList{}
    			for _, score := range test.scores {
    				scores = append(scores, framework.NodeScore{Score: score})
    			}
    
    			expectedScores := framework.NodeScoreList{}
    			for _, score := range test.expectedScores {
    				expectedScores = append(expectedScores, framework.NodeScore{Score: score})
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 14 16:15:18 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  2. pkg/scheduler/testing/framework/fake_extender.go

    	return &framework.NodeScoreList{}, fmt.Errorf("some error")
    }
    
    // Node1PrioritizerExtender implements PriorityFunc function to give score 10
    // if the given node's name is "node1"; otherwise score 1.
    func Node1PrioritizerExtender(pod *v1.Pod, nodes []*framework.NodeInfo) (*framework.NodeScoreList, error) {
    	result := framework.NodeScoreList{}
    	for _, node := range nodes {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 19:07:19 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go

    		{Utilization: 100, Score: 0},
    	}
    
    	tests := []struct {
    		name           string
    		requestedPod   *v1.Pod
    		nodes          []*v1.Node
    		existingPods   []*v1.Pod
    		expectedScores framework.NodeScoreList
    		resources      []config.ResourceSpec
    		shape          []config.UtilizationShapePoint
    		wantErrs       field.ErrorList
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/helper/normalize_score.go

    // reverses the scores by subtracting it from maxPriority.
    // Note: The input scores are always assumed to be non-negative integers.
    func DefaultNormalizeScore(maxPriority int64, reverse bool, scores framework.NodeScoreList) *framework.Status {
    	var maxCount int64
    	for i := range scores {
    		if scores[i].Score > maxCount {
    			maxCount = scores[i].Score
    		}
    	}
    
    	if maxCount == 0 {
    		if reverse {
    			for i := range scores {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 14 16:15:18 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go

    			},
    		},
    	}
    
    	nodeWithNoImages := v1.NodeStatus{}
    
    	tests := []struct {
    		pod          *v1.Pod
    		pods         []*v1.Pod
    		nodes        []*v1.Node
    		expectedList framework.NodeScoreList
    		name         string
    	}{
    		{
    			// Pod: gcr.io/40 gcr.io/250
    
    			// Node1
    			// Image: gcr.io/40:latest 40MB
    			// Score: 0 (40M/2 < 23M, min-threshold)
    
    			// Node2
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 19 06:17:57 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  6. 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)
  7. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    			Tolerations: tolerations,
    		},
    	}
    }
    
    func TestTaintTolerationScore(t *testing.T) {
    	tests := []struct {
    		name         string
    		pod          *v1.Pod
    		nodes        []*v1.Node
    		expectedList framework.NodeScoreList
    	}{
    		// basic test case
    		{
    			name: "node with taints tolerated by the pod, gets a higher score than those node with intolerable taints",
    			pod: podWithTolerations("pod1", []v1.Toleration{{
    				Key:      "foo",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go

    )
    
    func TestMostAllocatedScoringStrategy(t *testing.T) {
    	tests := []struct {
    		name           string
    		requestedPod   *v1.Pod
    		nodes          []*v1.Node
    		existingPods   []*v1.Pod
    		expectedScores framework.NodeScoreList
    		resources      []config.ResourceSpec
    		wantErrs       field.ErrorList
    		wantStatusCode framework.Code
    	}{
    		{
    			// Node1 scores (used resources) on 0-MaxNodeScore scale
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 16K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go

    	}
    
    	tests := []struct {
    		pod                                *v1.Pod
    		pods                               []*v1.Pod
    		nodes                              []*v1.Node
    		expectedList                       framework.NodeScoreList
    		name                               string
    		ignorePreferredTermsOfExistingPods bool
    		wantStatus                         *framework.Status
    	}{
    		{
    			name: "all nodes are same priority as Affinity is nil",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 44.8K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go

    )
    
    func TestLeastAllocatedScoringStrategy(t *testing.T) {
    	tests := []struct {
    		name           string
    		requestedPod   *v1.Pod
    		nodes          []*v1.Node
    		existingPods   []*v1.Pod
    		expectedScores framework.NodeScoreList
    		resources      []config.ResourceSpec
    		wantErrs       field.ErrorList
    		wantStatusCode framework.Code
    	}{
    		{
    			// Node1 scores (remaining resources) on 0-MaxNodeScore scale
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 18.8K bytes
    - Viewed (0)
Back to top