Merge pull request #4627 from karalabe/fix-gpu-usage-tracking

extern/sector-storage: fix GPU usage overwrite bug
This commit is contained in:
Łukasz Magiera
2020-10-29 10:13:54 +01:00
committed by GitHub
+3 -1
View File
@@ -27,7 +27,9 @@ func (a *activeResources) withResources(id WorkerID, wr storiface.WorkerResource
}
func (a *activeResources) add(wr storiface.WorkerResources, r Resources) {
a.gpuUsed = r.CanGPU
if r.CanGPU {
a.gpuUsed = true
}
a.cpuUse += r.Threads(wr.CPUs)
a.memUsedMin += r.MinMemory
a.memUsedMax += r.MaxMemory