1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00
This commit is contained in:
2020-06-15 15:21:35 +08:00
parent d750c30fb2
commit bfd63fda5f

View File

@@ -195,7 +195,9 @@ func (allocator *Allocator) GA(nodes []NodeStatus, tasks []Task, useBestFit bool
if t == 0 && useBestFit {
/* best-fit */
//ts := time.Now()
allocation.TasksOnNode = allocator.fastBestFit(nodesT, tasks).TasksOnNode
allo := allocator.fastBestFit(nodesT, tasks)
allocation.TasksOnNode = allo.TasksOnNode
allocation.Flags = allo.Flags
//log.Println(time.Since(ts))
//fmt.Println("Best Fit")
} else if t%2 == 0 {
@@ -249,7 +251,7 @@ func (allocator *Allocator) GA(nodes []NodeStatus, tasks []Task, useBestFit bool
}
}
if cnt != len(allocation.Tasks) && allocation.Flags["valid"] {
log.Warn("factory:", cnt, len(allocation.Tasks))
log.Warn("factory:", cnt, len(allocation.Tasks), " t=", t)
}
return allocation