CHECK log
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user