~james/core

core/spindle/engine/usage.go -rw-r--r-- 593 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 14 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package engine

import "tangled.org/core/spindle/models"

type WorkflowResourceUsage struct {
	CPUUsec              uint64
	MemoryCurrentBytes   uint64
	MemoryPeakBytes      uint64
	SwapCurrentBytes     uint64
	SwapPeakBytes        uint64
	PIDsCurrent          uint64
	IOReadBytes          uint64
	IOWriteBytes         uint64
	IOReadOps            uint64
	IOWriteOps           uint64
	VolumeAllocatedBytes uint64
	CgroupAvailable      bool
	VolumeAvailable      bool
}

type WorkflowResourceUsageReporter interface {
	WorkflowResourceUsage(wf *models.Workflow) (WorkflowResourceUsage, bool)
}