kubernetesk8s.io/kubernetes/pkg/scheduler/backend/cache/debugger Index | Files

package debugger

import "k8s.io/kubernetes/pkg/scheduler/backend/cache/debugger"

Index

Types

type CacheComparer

type CacheComparer struct {
	NodeLister corelisters.NodeLister
	PodLister  corelisters.PodLister
	Cache      internalcache.Cache
	PodQueue   internalqueue.SchedulingQueue
}

CacheComparer is an implementation of the Scheduler's cache comparer.

func (*CacheComparer) Compare

func (c *CacheComparer) Compare(logger klog.Logger) error

Compare compares the nodes and pods of NodeLister with Cache.Snapshot.

func (*CacheComparer) CompareNodes

func (c *CacheComparer) CompareNodes(nodes []*v1.Node, nodeinfos map[string]*framework.NodeInfo) (missed, redundant []string)

CompareNodes compares actual nodes with cached nodes.

func (*CacheComparer) ComparePods

func (c *CacheComparer) ComparePods(pods, waitingPods []*v1.Pod, nodeinfos map[string]*framework.NodeInfo) (missed, redundant []string)

ComparePods compares actual pods with cached pods.

type CacheDebugger

type CacheDebugger struct {
	Comparer CacheComparer
	Dumper   CacheDumper
}

CacheDebugger provides ways to check and write cache information for debugging.

func New

New creates a CacheDebugger.

func (*CacheDebugger) ListenForSignal

func (d *CacheDebugger) ListenForSignal(ctx context.Context)

ListenForSignal starts a goroutine that will trigger the CacheDebugger's behavior when the process receives SIGINT (Windows) or SIGUSER2 (non-Windows).

type CacheDumper

type CacheDumper struct {
	// contains filtered or unexported fields
}

CacheDumper writes some information from the scheduler cache and the scheduling queue to the scheduler logs for debugging purposes.

func (*CacheDumper) DumpAll

func (d *CacheDumper) DumpAll(logger klog.Logger)

DumpAll writes cached nodes and scheduling queue information to the scheduler logs.

Source Files

comparer.go debugger.go dumper.go signal.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
14 packages
Last checked
3 hours ago

Tools for package owners.