Documentation ¶
Overview ¶
Package topology contains helpers for the CPU manager.
Index ¶
- type CPUDetails
- func (d CPUDetails) CPUs() cpuset.CPUSet
- func (d CPUDetails) CPUsInCore(id int) cpuset.CPUSet
- func (d CPUDetails) CPUsInSocket(id int) cpuset.CPUSet
- func (d CPUDetails) Cores() cpuset.CPUSet
- func (d CPUDetails) CoresInSocket(id int) cpuset.CPUSet
- func (d CPUDetails) KeepOnly(cpus cpuset.CPUSet) CPUDetails
- func (d CPUDetails) Sockets() cpuset.CPUSet
- type CPUInfo
- type CPUTopology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUDetails ¶
CPUDetails is a map from CPU ID to Core ID and Socket ID.
func (CPUDetails) CPUs ¶
func (d CPUDetails) CPUs() cpuset.CPUSet
CPUs returns all of the logical CPU IDs in this CPUDetails.
func (CPUDetails) CPUsInCore ¶
func (d CPUDetails) CPUsInCore(id int) cpuset.CPUSet
CPUsInCore returns all of the logical CPU IDs associated with the given core ID in this CPUDetails.
func (CPUDetails) CPUsInSocket ¶
func (d CPUDetails) CPUsInSocket(id int) cpuset.CPUSet
CPUsInSocket returns all of the logical CPU IDs associated with the given socket ID in this CPUDetails.
func (CPUDetails) Cores ¶
func (d CPUDetails) Cores() cpuset.CPUSet
Cores returns all of the core IDs associated with the CPUs in this CPUDetails.
func (CPUDetails) CoresInSocket ¶
func (d CPUDetails) CoresInSocket(id int) cpuset.CPUSet
CoresInSocket returns all of the core IDs associated with the given socket ID in this CPUDetails.
func (CPUDetails) KeepOnly ¶
func (d CPUDetails) KeepOnly(cpus cpuset.CPUSet) CPUDetails
KeepOnly returns a new CPUDetails object with only the supplied cpus.
func (CPUDetails) Sockets ¶
func (d CPUDetails) Sockets() cpuset.CPUSet
Sockets returns all of the socket IDs associated with the CPUs in this CPUDetails.
type CPUTopology ¶
type CPUTopology struct { NumCPUs int NumCores int NumSockets int CPUDetails CPUDetails }
CPUTopology contains details of node cpu, where : CPU - logical CPU, cadvisor - thread Core - physical CPU, cadvisor - Core Socket - socket, cadvisor - Node
func Discover ¶
func Discover(machineInfo *cadvisorapi.MachineInfo) (*CPUTopology, error)
Discover returns CPUTopology based on cadvisor node info
func (*CPUTopology) CPUsPerCore ¶
func (topo *CPUTopology) CPUsPerCore() int
CPUsPerCore returns the number of logical CPUs are associated with each core.
func (*CPUTopology) CPUsPerSocket ¶
func (topo *CPUTopology) CPUsPerSocket() int
CPUsPerSocket returns the number of logical CPUs are associated with each socket.