- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for BuildBrokenLinearFunction (0.43 sec)
-
pkg/scheduler/framework/plugins/helper/shape_score.go
// FunctionShapePoint represents a shape point. type FunctionShapePoint struct { // Utilization is function argument. Utilization int64 // Score is function value. Score int64 } // BuildBrokenLinearFunction creates a function which is built using linear segments. Segments are defined via shape array. // Shape[i].Utilization slice represents points on "Utilization" axis where different segments meet.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 1.7K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/volumebinding/scorer.go
// buildScorerFunction builds volumeCapacityScorer from the scoring function shape. func buildScorerFunction(scoringFunctionShape helper.FunctionShape) volumeCapacityScorer { rawScoringFunction := helper.BuildBrokenLinearFunction(scoringFunctionShape) f := func(requested, capacity int64) int64 { if capacity == 0 || requested > capacity { return rawScoringFunction(maxUtilization) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Aug 13 11:08:45 UTC 2021 - 1.8K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go
func buildRequestedToCapacityRatioScorerFunction(scoringFunctionShape helper.FunctionShape, resources []config.ResourceSpec) func([]int64, []int64) int64 { rawScoringFunction := helper.BuildBrokenLinearFunction(scoringFunctionShape) resourceScoringFunction := func(requested, capacity int64) int64 { if capacity == 0 || requested > capacity { return rawScoringFunction(maxUtilization) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Dec 21 15:23:47 UTC 2022 - 2.6K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go
{p: 100, expected: 2}, {p: 110, expected: 2}, }, }, } for i, test := range tests { t.Run(fmt.Sprintf("case_%d", i), func(t *testing.T) { function := helper.BuildBrokenLinearFunction(test.points) for _, assertion := range test.assertions { assert.InDelta(t, assertion.expected, function(assertion.p), 0.1, "points=%v, p=%d", test.points, assertion.p) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 21.2K bytes - Viewed (0)