Quellcode durchsuchen

gteq to favor your migration

Ajay Tripathy vor 4 Jahren
Ursprung
Commit
74a5e6c013
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      pkg/costmodel/allocation.go

+ 1 - 1
pkg/costmodel/allocation.go

@@ -895,7 +895,7 @@ func applyRAMBytesUsedMax(podMap map[podKey]*Pod, resRAMBytesUsedMax []*prom.Que
 }
 }
 
 
 func applyGPUsRequested(podMap map[podKey]*Pod, resGPUsRequested []*prom.QueryResult, resGPUsAllocated []*prom.QueryResult) {
 func applyGPUsRequested(podMap map[podKey]*Pod, resGPUsRequested []*prom.QueryResult, resGPUsAllocated []*prom.QueryResult) {
-	if len(resGPUsAllocated) > len(resGPUsRequested) { // Use the new query, when it's been available in a window longer than the old query
+	if len(resGPUsAllocated) >= len(resGPUsRequested) { // Use the new query, when it's been available in a window longer/equal to than the old query
 		resGPUsRequested = resGPUsAllocated
 		resGPUsRequested = resGPUsAllocated
 	}
 	}
 	for _, res := range resGPUsRequested {
 	for _, res := range resGPUsRequested {