Skip to content

Commit

Permalink
fix: remove incomplete resource check log
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Oct 8, 2024
1 parent aa07266 commit 903fa13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions harmony/harmonytask/harmonytask.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,14 @@ var rlog = logging.Logger("harmony-res")
// ResourcesAvailable determines what resources are still unassigned.
func (e *TaskEngine) ResourcesAvailable() resources.Resources {
tmp := e.reg.Resources
llog := rlog.With("Resource availability Check")
for _, t := range e.handlers {
ct := t.Max.ActiveThis()
tmp.Cpu -= ct * t.Cost.Cpu
tmp.Gpu -= float64(ct) * t.Cost.Gpu
tmp.Ram -= uint64(ct) * t.Cost.Ram
llog.Debugw("Per task type", "Name", t.Name, "Count", ct, "CPU", ct*t.Cost.Cpu, "RAM", uint64(ct)*t.Cost.Ram, "GPU", float64(ct)*t.Cost.Gpu)
rlog.Debugw("Per task type", "Name", t.Name, "Count", ct, "CPU", ct*t.Cost.Cpu, "RAM", uint64(ct)*t.Cost.Ram, "GPU", float64(ct)*t.Cost.Gpu)
}
llog.Debugw("Total", "CPU", tmp.Cpu, "RAM", tmp.Ram, "GPU", tmp.Gpu)
rlog.Debugw("Total", "CPU", tmp.Cpu, "RAM", tmp.Ram, "GPU", tmp.Gpu)
return tmp
}

Expand Down

0 comments on commit 903fa13

Please sign in to comment.