2020-04-23 22:16:21 +00:00
|
|
|
package storiface
|
|
|
|
|
2020-07-21 18:01:25 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2020-08-17 13:26:18 +00:00
|
|
|
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
|
2020-07-21 18:01:25 +00:00
|
|
|
"github.com/filecoin-project/specs-actors/actors/abi"
|
|
|
|
)
|
|
|
|
|
2020-04-23 22:16:21 +00:00
|
|
|
type WorkerInfo struct {
|
|
|
|
Hostname string
|
|
|
|
|
|
|
|
Resources WorkerResources
|
|
|
|
}
|
|
|
|
|
|
|
|
type WorkerResources struct {
|
|
|
|
MemPhysical uint64
|
|
|
|
MemSwap uint64
|
|
|
|
|
|
|
|
MemReserved uint64 // Used by system / other processes
|
|
|
|
|
2020-04-27 12:38:24 +00:00
|
|
|
CPUs uint64 // Logical cores
|
2020-04-23 22:16:21 +00:00
|
|
|
GPUs []string
|
|
|
|
}
|
|
|
|
|
|
|
|
type WorkerStats struct {
|
|
|
|
Info WorkerInfo
|
|
|
|
|
|
|
|
MemUsedMin uint64
|
|
|
|
MemUsedMax uint64
|
2020-08-16 10:40:35 +00:00
|
|
|
GpuUsed bool // nolint
|
|
|
|
CpuUse uint64 // nolint
|
2020-04-23 22:16:21 +00:00
|
|
|
}
|
2020-07-21 18:01:25 +00:00
|
|
|
|
|
|
|
type WorkerJob struct {
|
|
|
|
ID uint64
|
|
|
|
Sector abi.SectorID
|
|
|
|
Task sealtasks.TaskType
|
|
|
|
|
2020-08-27 21:14:33 +00:00
|
|
|
RunWait bool
|
|
|
|
Start time.Time
|
2020-07-21 18:01:25 +00:00
|
|
|
}
|