metrics

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BindingAdd is the event when a new binding is added to API server.
	BindingAdd = "BindingAdd"
	// BindingUpdate is the event when a new binding is updated to API server.
	BindingUpdate = "BindingUpdate"
	// ScheduleAttemptFailure is the event when a schedule attempt fails.
	ScheduleAttemptFailure = "ScheduleAttemptFailure"
	// PolicyChanged means binding needs to be rescheduled for the policy changed
	PolicyChanged = "PolicyChanged"
	// ClusterNotReady means binding needs to be rescheduled for cluster is not ready
	ClusterNotReady = "ClusterNotReady"
)
View Source
const (
	// ScheduleStepFilter means the step in generic scheduler to filter clusters
	ScheduleStepFilter = "Filter"
	// ScheduleStepScore means the step in generic scheduler to score clusters
	ScheduleStepScore = "Score"
	// ScheduleStepSelect means the step in generic scheduler to select clusters
	ScheduleStepSelect = "Select"
	// ScheduleStepAssignReplicas means the step in generic scheduler to assign replicas
	ScheduleStepAssignReplicas = "AssignReplicas"
)
View Source
const SchedulerSubsystem = "karmada_scheduler"

SchedulerSubsystem - subsystem name used by scheduler

Variables

This section is empty.

Functions

func BindingSchedule

func BindingSchedule(scheduleType string, duration float64, err error)

BindingSchedule can record a scheduling attempt and the duration since `start`.

func CountSchedulerBindings

func CountSchedulerBindings(event string)

CountSchedulerBindings records the number of binding added to scheduling queues by event type.

func Register

func Register()

Register all metrics.

func RegisterMetrics

func RegisterMetrics(extraMetrics ...prometheus.Collector)

RegisterMetrics registers a list of metrics. This function is exported because it is intended to be used by out-of-tree plugins to register their custom metrics.

func ScheduleStep

func ScheduleStep(action string, startTime time.Time)

ScheduleStep can record each scheduling step duration.

func SinceInSeconds

func SinceInSeconds(start time.Time) float64

SinceInSeconds gets the time since the specified start in seconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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