metrics

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EstimatingTypeMaxAvailableReplicas - label of estimating type
	EstimatingTypeMaxAvailableReplicas = "MaxAvailableReplicas"
	// EstimatingTypeGetUnschedulableReplicas - label of estimating type
	EstimatingTypeGetUnschedulableReplicas = "GetUnschedulableReplicas"
)
View Source
const (
	// EstimatingStepListNodesByNodeClaim - label of estimating step
	EstimatingStepListNodesByNodeClaim = "ListNodesByNodeClaim"
	// EstimatingStepMaxAvailableReplicas - label of estimating step
	EstimatingStepMaxAvailableReplicas = "MaxAvailableReplicas"
	// EstimatingStepGetObjectFromCache - label of estimating step
	EstimatingStepGetObjectFromCache = "GetObjectFromCache"
	// EstimatingStepGetUnschedulablePodsOfWorkload - label of estimating step
	EstimatingStepGetUnschedulablePodsOfWorkload = "GetWorkloadUnschedulablePods"
	// EstimatingStepTotal - label of estimating step, total step
	EstimatingStepTotal = "Total"
)
View Source
const SchedulerEstimatorSubsystem = "karmada_scheduler_estimator"

SchedulerEstimatorSubsystem - subsystem name used by scheduler estimator

Variables

View Source
var (

	// FrameworkExtensionPointDuration is the metrics which indicates the latency for running all plugins of a specific extension point.
	FrameworkExtensionPointDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: SchedulerEstimatorSubsystem,
			Name:      "estimating_plugin_extension_point_duration_seconds",
			Help:      "Latency for running all plugins of a specific extension point.",

			Buckets: prometheus.ExponentialBuckets(0.0001, 2, 12),
		},
		[]string{"estimating_plugin_extension_point"})

	// PluginExecutionDuration is the metrics which indicates the duration for running a plugin at a specific extension point.
	PluginExecutionDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: SchedulerEstimatorSubsystem,
			Name:      "estimating_plugin_execution_duration_seconds",
			Help:      "Duration for running a plugin at a specific extension point.",

			Buckets: prometheus.ExponentialBuckets(0.00001, 1.5, 20),
		},
		[]string{"estimating_plugin", "estimating_plugin_extension_point"})
)

Functions

func CountRequests

func CountRequests(err error, estimatingType string)

CountRequests total number of scheduler estimator requests

func UpdateEstimatingAlgorithmLatency

func UpdateEstimatingAlgorithmLatency(err error, estimatingType, estimatingStep string, startTime time.Time)

UpdateEstimatingAlgorithmLatency updates latency for every step

Types

This section is empty.

Jump to

Keyboard shortcuts

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