func quantityMustParse(value string) *resource.Quantity { … }
func TestGetReclaimableThreshold(t *testing.T) { … }
func TestParseThresholdConfig(t *testing.T) { … }
func TestAddAllocatableThresholds(t *testing.T) { … }
func TestFallbackResourcesUsage(t *testing.T) { … }
func thresholdsEqual(expected []evictionapi.Threshold, actual []evictionapi.Threshold) bool { … }
func thresholdEqual(a evictionapi.Threshold, b evictionapi.Threshold) bool { … }
func TestOrderedByExceedsRequestMemory(t *testing.T) { … }
func TestOrderedByExceedsRequestDisk(t *testing.T) { … }
func TestOrderedByPriority(t *testing.T) { … }
func TestOrderedbyDisk(t *testing.T) { … }
func TestOrderedbyInodes(t *testing.T) { … }
func TestOrderedByPriorityDisk(t *testing.T) { … }
func TestOrderedByPriorityInodes(t *testing.T) { … }
func TestOrderedByMemory(t *testing.T) { … }
func TestOrderedByPriorityMemory(t *testing.T) { … }
func TestOrderedByPriorityProcess(t *testing.T) { … }
func TestSortByEvictionPriority(t *testing.T) { … }
type fakeSummaryProvider …
func (f *fakeSummaryProvider) Get(ctx context.Context, updateStats bool) (*statsapi.Summary, error) { … }
func (f *fakeSummaryProvider) GetCPUAndMemoryStats(ctx context.Context) (*statsapi.Summary, error) { … }
func newPodStats(pod *v1.Pod, podWorkingSetBytes uint64) statsapi.PodStats { … }
func TestMakeSignalObservations(t *testing.T) { … }
func TestThresholdsMet(t *testing.T) { … }
func TestThresholdsUpdatedStats(t *testing.T) { … }
func TestPercentageThresholdsMet(t *testing.T) { … }
func TestThresholdsFirstObservedAt(t *testing.T) { … }
func TestThresholdsMetGracePeriod(t *testing.T) { … }
func TestNodeConditions(t *testing.T) { … }
func TestNodeConditionsLastObservedAt(t *testing.T) { … }
func TestNodeConditionsObservedSince(t *testing.T) { … }
func TestHasNodeConditions(t *testing.T) { … }
func TestParsePercentage(t *testing.T) { … }
func TestCompareThresholdValue(t *testing.T) { … }
func TestAddContainerFsThresholds(t *testing.T) { … }
func newPodInodeStats(pod *v1.Pod, rootFsInodesUsed, logsInodesUsed, perLocalVolumeInodesUsed resource.Quantity) statsapi.PodStats { … }
func newPodDiskStats(pod *v1.Pod, rootFsUsed, logsUsed, perLocalVolumeUsed resource.Quantity) statsapi.PodStats { … }
func newPodMemoryStats(pod *v1.Pod, workingSet resource.Quantity) statsapi.PodStats { … }
func newPodProcessStats(pod *v1.Pod, num uint64) statsapi.PodStats { … }
func newResourceList(cpu, memory, disk string) v1.ResourceList { … }
func newResourceRequirements(requests, limits v1.ResourceList) v1.ResourceRequirements { … }
func newContainer(name string, requests v1.ResourceList, limits v1.ResourceList) v1.Container { … }
func newRestartableInitContainer(name string, requests v1.ResourceList, limits v1.ResourceList) v1.Container { … }
func newVolume(name string, volumeSource v1.VolumeSource) v1.Volume { … }
func newPod(name string, priority int32, containers []v1.Container, volumes []v1.Volume) *v1.Pod { … }
func newPodWithInitContainers(name string, priority int32, initContainers []v1.Container, containers []v1.Container, volumes []v1.Volume) *v1.Pod { … }
type nodeConditionList …
func (s1 nodeConditionList) Equal(s2 nodeConditionList) bool { … }
type thresholdList …
func (s1 thresholdList) Equal(s2 thresholdList) bool { … }
func TestStatsNotFoundForPod(t *testing.T) { … }
func TestEvictionMessage(t *testing.T) { … }