From cc23cbeab42c3d0b60fa65e3c608e586a433d12c Mon Sep 17 00:00:00 2001 From: Noah Held Date: Tue, 27 Jun 2023 18:46:01 +0100 Subject: [PATCH] Fix merge --- internal/scheduler/common.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/internal/scheduler/common.go b/internal/scheduler/common.go index b2eb4507fe1..5c27148b871 100644 --- a/internal/scheduler/common.go +++ b/internal/scheduler/common.go @@ -2,7 +2,6 @@ package scheduler import ( "fmt" - "math" "strconv" "github.com/pkg/errors" @@ -146,14 +145,3 @@ func GangIdAndCardinalityFromAnnotations(annotations map[string]string) (string, } return gangId, gangCardinality, true, nil } - -// ResourceListAsWeightedMillis returns the linear combination of the milli values in rl with given weights. -// This function overflows for values that exceed MaxInt64. E.g., 1Pi is fine but not 10Pi. -func ResourceListAsWeightedMillis(weights map[string]float64, rl schedulerobjects.ResourceList) int64 { - var rv int64 - for t, f := range weights { - q := rl.Get(t) - rv += int64(math.Round(float64(q.MilliValue()) * f)) - } - return rv -}