1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-13 07:46:43 +00:00
This commit is contained in:
2020-05-26 21:01:41 +08:00
parent fe6f9f2b63
commit e462a46a19
2 changed files with 6 additions and 6 deletions

View File

@@ -57,8 +57,8 @@ func firstFit(allocation Allocation, task Task) (string, bool) {
}
func fastBestFit(nodes []NodeStatus, tasks []Task) Allocation {
//log.Info(nodes)
//log.Info(tasks)
log.Info(nodes)
log.Info(tasks)
eva := Evaluator{}
eva.init(nodes, tasks)

View File

@@ -11,20 +11,20 @@ import (
)
func TgenerateCase() ([]NodeStatus, []Task) {
numTask := 6
numTask := 2
var nodes []NodeStatus
var tasks []Task
for i := 0; i < numTask*3; i++ {
for i := 0; i < numTask; i++ {
node := NodeStatus{ClientID: strconv.Itoa(i), Rack: "Rack-" + strconv.Itoa(i%40), Domain: "Domain-" + strconv.Itoa(i%4)}
node.NumCPU = 24
node.UtilCPU = 2.0
node.MemTotal = 188
node.MemAvailable = 20
node.TotalBW = 100
//cnt := 4
cnt := rand.Intn(3) + 1
cnt := 1
//cnt := rand.Intn(3) + 1
for i := 0; i < cnt; i++ {
node.Status = append(node.Status, GPUStatus{MemoryTotal: 11439, MemoryAllocated: 0, UUID: node.ClientID + "-" + strconv.Itoa(i)})
}