Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for calculatePodResourceRequest (0.36 sec)

  1. pkg/scheduler/framework/plugins/noderesources/resource_allocation.go

    	logger.V(10).Info("Requested resource is omitted for node score calculation", "resourceName", resource)
    	return 0, 0
    }
    
    // calculatePodResourceRequest returns the total non-zero requests. If Overhead is defined for the pod
    // the Overhead is added to the result.
    func (r *resourceAllocationScorer) calculatePodResourceRequest(pod *v1.Pod, resourceName v1.ResourceName) int64 {
    
    	opts := resourcehelper.PodResourcesOptions{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 20 14:53:43 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/noderesources/resource_allocation_test.go

    			},
    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			var scorer resourceAllocationScorer
    			for n, exp := range tc.expected {
    				got := scorer.calculatePodResourceRequest(&tc.pod, n)
    				if got != exp {
    					t.Errorf("expected %s = %d, got %d", n, exp, got)
    				}
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 09 23:15:53 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top