mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-13 07:46:43 +00:00
update shceduler_fair
This commit is contained in:
@@ -340,10 +340,15 @@ func (scheduler *SchedulerFair) UpdateNextQueue() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v := range scheduler.resourceAllocations {
|
for k, t := range scheduler.queues {
|
||||||
if t, ok := scheduler.queues[k]; !ok || len(t) == 0 {
|
if len(t) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if _, ok := scheduler.resourceAllocations[k]; !ok {
|
||||||
|
scheduler.resourceAllocations[k] = &ResourceCount{}
|
||||||
|
}
|
||||||
|
v := scheduler.resourceAllocations[k]
|
||||||
|
|
||||||
tmp := 0.0
|
tmp := 0.0
|
||||||
tmp += float64(v.CPU) / CPU
|
tmp += float64(v.CPU) / CPU
|
||||||
tmp += float64(v.Memory) / Memory
|
tmp += float64(v.Memory) / Memory
|
||||||
|
|||||||
Reference in New Issue
Block a user