mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 16:16:44 +00:00
update
This commit is contained in:
@@ -195,7 +195,9 @@ func (allocator *Allocator) GA(nodes []NodeStatus, tasks []Task, useBestFit bool
|
|||||||
if t == 0 && useBestFit {
|
if t == 0 && useBestFit {
|
||||||
/* best-fit */
|
/* best-fit */
|
||||||
//ts := time.Now()
|
//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))
|
//log.Println(time.Since(ts))
|
||||||
//fmt.Println("Best Fit")
|
//fmt.Println("Best Fit")
|
||||||
} else if t%2 == 0 {
|
} 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"] {
|
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
|
return allocation
|
||||||
|
|||||||
Reference in New Issue
Block a user