Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The statistics the basic executor exposes ExecutorBasicMeasuredMemStats = []string{"RSS", "Swap"} ExecutorBasicMeasuredCpuStats = []string{"System Mode", "User Mode", "Percent"} )
Functions ¶
func Aggregate ¶
func Aggregate(systemStats *cpustats.Tracker, procStats ProcUsages) *drivers.TaskResourceUsage
Aggregate combines a given ProcUsages with the Tracker for the Client.
Types ¶
type ProcUsages ¶
type ProcUsages map[string]*drivers.ResourceUsage
ProcUsages is a map from PID to the resources that process is consuming.
The pid type is a string because that's how Nomad wants it.
type ProcessID ¶
type ProcessID = int
ProcessID is an alias for int; it just helps us identify where PIDs from the kernel are being used.
type ProcessList ¶
A ProcessList is anything (i.e. a task driver) that implements ListProcesses for gathering the list of process IDs associated with a task.
type ProcessStats ¶
type ProcessStats interface {
StatProcesses() ProcUsages
}
A ProcessStats is anything (i.e. a task driver) that implements StatProcesses for gathering CPU and memory process stats for all processes associated with a task.
func New ¶
func New(compute cpustats.Compute, pl ProcessList) ProcessStats
Click to show internal directories.
Click to hide internal directories.