metrics

package
v0.0.0-...-e54718b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// OperationLabel - operation label name
	OperationLabel = "operation"

	// QueueLabel - the label used to identify the subQueue name in SchedulingQueue and BinderQueue
	QueueLabel = "queue"

	// EventLabel - the label used by event
	EventLabel = "event"

	QosLabel             = "qos"
	PriorityLabel        = "priority"
	SubClusterLabel      = "sub_cluster"
	ResultLabel          = "result"
	AttemptsLabel        = "attempts"
	PluginLabel          = "plugin"
	StatusLabel          = "status"
	WorkLabel            = "work"
	TypeLabel            = "type"
	ResourceLabel        = "resource"
	NodeGroupLabel       = "node_group"
	PreemptingStageLabel = "stage"
	SchedulerLabel       = "scheduler"
	StateLabel           = "state"
	ReasonLabel          = "reason"
	UnitTypeLabel        = "unit_type"
	StageLabel           = "stage"
)
View Source
const (
	RescheduleAlgorithmLabel = "rescheduleAlgorithm"
	UpdateResultLabel        = "updateResult"
	SuggestResultLabel       = "suggestResult"
	PhaseLabel               = "phase"
)
View Source
const (
	UndefinedLabelValue = "-"
)

Variables

This section is empty.

Functions

func WithLimitedLengthHandler

func WithLimitedLengthHandler(h http.Handler, f HandlerFunc) http.Handler

Types

type HandlerFunc

type HandlerFunc func(responseSize int)

type MetricRecorder

type MetricRecorder interface {
	Inc(obj interface{})
	Dec(obj interface{})
	Clear()
	// AddingLatencyInSeconds is used to collect latency for adding into queue, which may be effected by sorting algorithm
	AddingLatencyInSeconds(obj interface{}, duration float64)
}

MetricRecorder represents a metric recorder which takes action when the metric Inc(), Dec() and Clear()

Jump to

Keyboard shortcuts

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