CHECK log

This commit is contained in:
mr
2026-03-20 14:51:08 +01:00
parent fafa1186c2
commit bd3e81be0c

View File

@@ -172,12 +172,15 @@ func (p *Planner) Check(resourceID string, instanceID string, req *ResourceReque
fmt.Println("CHECK4 MISS", slot.Start, slot.End, start, end)
continue
}
fmt.Println("CHECK5", reqPct)
// If capacity is unknown (reqPct empty), any overlap blocks the slot.
if len(reqPct) == 0 {
return false
}
// Combined usage must not exceed 100 % for any requested dimension
for dim, needed := range reqPct {
fmt.Println("CHECK6", slot.Usage[dim]+needed)
if slot.Usage[dim]+needed > 100.0 {
return false
}