Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for buildScorerFunction (0.26 sec)

  1. pkg/scheduler/framework/plugins/volumebinding/scorer.go

    // volumeCapacityScorer calculates the score based on class storage resource information.
    type volumeCapacityScorer func(classResourceMap) int64
    
    // buildScorerFunction builds volumeCapacityScorer from the scoring function shape.
    func buildScorerFunction(scoringFunctionShape helper.FunctionShape) volumeCapacityScorer {
    	rawScoringFunction := helper.BuildBrokenLinearFunction(scoringFunctionShape)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 13 11:08:45 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/volumebinding/scorer_test.go

    							Requested: 100,
    							Capacity:  100,
    						},
    					},
    					50,
    				},
    			},
    		},
    	}
    
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			f := buildScorerFunction(tt.shape)
    			for _, c := range tt.cases {
    				gotScore := f(c.classResources)
    				if gotScore != c.score {
    					t.Errorf("Expect %d, but got %d", c.score, gotScore)
    				}
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 13 11:08:45 UTC 2021
    - 5.8K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/volumebinding/volume_binding.go

    			shape = append(shape, helper.FunctionShapePoint{
    				Utilization: int64(point.Utilization),
    				Score:       int64(point.Score) * (framework.MaxNodeScore / config.MaxCustomPriorityScore),
    			})
    		}
    		scorer = buildScorerFunction(shape)
    	}
    	return &VolumeBinding{
    		Binder:    binder,
    		PVCLister: pvcInformer.Lister(),
    		scorer:    scorer,
    		fts:       fts,
    	}, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 14:13:06 UTC 2024
    - 16.4K bytes
    - Viewed (0)
Back to top