- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 792 for scorer (0.14 sec)
-
pkg/scheduler/framework/plugins/noderesources/resource_allocation.go
// cpu and memory. useRequested bool scorer func(requested, allocable []int64) int64 resources []config.ResourceSpec } // score will use `scorer` function to calculate the score. func (r *resourceAllocationScorer) score( ctx context.Context, pod *v1.Pod, nodeInfo *framework.NodeInfo, podRequests []int64) (int64, *framework.Status) { logger := klog.FromContext(ctx) node := nodeInfo.Node()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 20 14:53:43 UTC 2023 - 5.3K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
} if state.hasStaticBindings { return nil } return framework.NewStatus(framework.Skip) } // Score invoked at the score extension point. func (pl *VolumeBinding) Score(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { if pl.scorer == nil { return 0, nil } state, err := getStateData(cs) if err != nil { return 0, framework.AsStatus(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 16 14:13:06 UTC 2024 - 16.4K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/noderesources/fit.go
) // nodeResourceStrategyTypeMap maps strategy to scorer implementation var nodeResourceStrategyTypeMap = map[config.ScoringStrategyType]scorer{ config.LeastAllocated: func(args *config.NodeResourcesFitArgs) *resourceAllocationScorer { resources := args.ScoringStrategy.Resources return &resourceAllocationScorer{ Name: string(config.LeastAllocated), scorer: leastResourceScorer(resources), resources: resources, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 13:26:09 UTC 2024 - 20.2K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/noderesources/resource_allocation_test.go
v1.ResourceMemory: 3 + util.DefaultMemoryRequest, }, }, } 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) -
pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go
} return s, nil } // Name returns name of the plugin. It is used in logs, etc. func (ba *BalancedAllocation) Name() string { return BalancedAllocationName } // Score invoked at the score extension point. func (ba *BalancedAllocation) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { nodeInfo, err := ba.handle.SnapshotSharedLister().NodeInfos().Get(nodeName)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 6.5K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/interpodaffinity/scoring.go
var maxCount int64 = math.MinInt64 for i := range scores { score := scores[i].Score if score > maxCount { maxCount = score } if score < minCount { minCount = score } } maxMinDiff := maxCount - minCount for i := range scores { fScore := float64(0) if maxMinDiff > 0 { fScore = float64(framework.MaxNodeScore) * (float64(scores[i].Score-minCount) / float64(maxMinDiff)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 10.5K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/podtopologyspread/scoring.go
var minScore int64 = math.MaxInt64 var maxScore int64 for i, score := range scores { // it's mandatory to check if <score.Name> is present in m.IgnoredNodes if s.IgnoredNodes.Has(score.Name) { scores[i].Score = invalidScore continue } if score.Score < minScore { minScore = score.Score } if score.Score > maxScore { maxScore = score.Score } } for i := range scores {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 10.1K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/imagelocality/image_locality.go
} // sumImageScores returns the sum of image scores of all the containers that are already on the node. // Each image receives a raw score of its size, scaled by scaledImageScore. The raw scores are later used to calculate // the final score. func sumImageScores(nodeInfo *framework.NodeInfo, pod *v1.Pod, totalNumNodes int) int64 { var sum int64
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 19 06:17:57 UTC 2024 - 5K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/helper/normalize_score_test.go
}, { scores: []int64{0, 0, 0, 0}, expectedScores: []int64{0, 0, 0, 0}, }, { reverse: true, scores: []int64{0, 0, 0, 0}, expectedScores: []int64{100, 100, 100, 100}, }, } for i, test := range tests { t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) { scores := framework.NodeScoreList{} for _, score := range test.scores {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 14 16:15:18 UTC 2022 - 2.4K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go
hostResult, status := p.(framework.ScorePlugin).Score(ctx, state, test.pod, test.nodes[i].Name) if !status.IsSuccess() { t.Errorf("Score is expected to return success, but didn't. Got status: %v", status) } if !reflect.DeepEqual(test.expectedList[i].Score, hostResult) { t.Errorf("got score %v for host %v, expected %v", hostResult, test.nodes[i].Name, test.expectedList[i].Score) } } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 15.9K bytes - Viewed (0)