resourcemonitor

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputePodFingerprint added in v0.6.1

func ComputePodFingerprint(podRes []*podresourcesapi.PodResources) string

func ContainerDevicesToPerNUMAResourceCounters added in v0.1.1

func ContainerDevicesToPerNUMAResourceCounters(devices []*podresourcesapi.ContainerDevices) perNUMAResourceCounter

func GetAllContainerDevices added in v0.1.1

func GetAllContainerDevices(podRes []*podresourcesapi.PodResources, namespace string, coreIDToNodeIDMap map[int]int) []*podresourcesapi.ContainerDevices

func MakeCoreIDToNodeIDMap added in v0.1.1

func MakeCoreIDToNodeIDMap(topo *ghw.TopologyInfo) map[int]int

func NewResourceMonitor added in v0.1.1

func NewResourceMonitor(podResCli podresourcesapi.PodResourcesListerClient, args Args, options ...func(*resourceMonitor)) (*resourceMonitor, error)

func NormalizeContainerDevices added in v0.1.1

func NormalizeContainerDevices(devices []*podresourcesapi.ContainerDevices, memoryBlocks []*podresourcesapi.ContainerMemory, cpuIds []int64, coreIDToNodeIDMap map[int]int) []*podresourcesapi.ContainerDevices

func WithK8sClient added in v0.7.0

func WithK8sClient(c kubernetes.Interface) func(*resourceMonitor)

func WithNodeName added in v0.7.0

func WithNodeName(name string) func(*resourceMonitor)

func WithTopology added in v0.7.0

func WithTopology(topo *ghw.TopologyInfo) func(*resourceMonitor)

Types

type Args

type Args struct {
	Namespace            string
	SysfsRoot            string
	ExcludeList          ResourceExcludeList
	RefreshNodeResources bool
	PodSetFingerprint    bool
	ExposeTiming         bool
}

type ResourceExcludeList

type ResourceExcludeList map[string][]string

func (ResourceExcludeList) String

func (rel ResourceExcludeList) String() string

func (ResourceExcludeList) ToMapSet

func (rel ResourceExcludeList) ToMapSet() map[string]sets.String

ToMapSet keeps the original keys, but replaces values with set.String types

type ResourceMonitor added in v0.1.1

type ResourceMonitor interface {
	Scan(excludeList ResourceExcludeList) (topologyv1alpha1.ZoneList, map[string]string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL