unitqueuesort

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LESS = iota
	EQUAL
	GREATER

	PriorityForDebugAnnotation = "godel.bytedance.com/customized-priority-for-debug"
)
View Source
const FCFSName = "FCFS"

FCFSName is the name of the plugin used in the plugin registry and configurations. FCFS means first created first serve, which is to sort units by creation timestamp in ascend order.

View Source
const (
	// Name is the name of the plugin used in the plugin registry and configurations.
	Name = "DefaultUnitQueueSort"
)

Variables

This section is empty.

Functions

func ComparePriorityForDebug

func ComparePriorityForDebug(annotations1, annotations2 map[string]string) int

func GetPriorityForDebug

func GetPriorityForDebug(annotations map[string]string) int

func New

New initializes a new plugin and returns it.

func NewFCFS

NewFCFS initializes a new plugin and returns it.

Types

type DefaultUnitQueueSort

type DefaultUnitQueueSort struct{}

DefaultUnitQueueSort is a plugin that implements Priority based sorting.

func (DefaultUnitQueueSort) Less

Less is the function used by the activeQ heap algorithm to sort pods. It sorts pods based on their priority. When priorities are equal, it uses PodQueueInfo.timestamp.

func (DefaultUnitQueueSort) Name

func (p DefaultUnitQueueSort) Name() string

Name returns name of the plugin.

type FCFS

type FCFS struct{}

FCFS is a plugin that implements Priority based sorting.

func (*FCFS) Less

func (p *FCFS) Less(uInfo1 *framework.QueuedUnitInfo, uInfo2 *framework.QueuedUnitInfo) bool

Less is the function used by the activeQ heap algorithm to sort pods. It sorts pods based on their priority. When priorities are equal, it uses QueuedUnitInfo.CreationTimestamp.

func (*FCFS) Name

func (p *FCFS) Name() string

Name returns name of the plugin.

Jump to

Keyboard shortcuts

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