Documentation ¶
Index ¶
- Constants
- Variables
- func Register()
- func RegisterMetrics(extraMetrics ...metrics.Registerable)
- func SinceInSeconds(start time.Time) float64
- func SubscriptionScheduleError(profile string, duration float64)
- func SubscriptionScheduled(profile string, duration float64)
- func SubscriptionUnschedulable(profile string, duration float64)
Constants ¶
View Source
const ( // SchedulerSubsystem - subsystem name used by scheduler SchedulerSubsystem = "clusternet_scheduler" // Binding - binding operation label value Binding = "binding" )
Variables ¶
View Source
var ( SchedulingAlgorithmLatency = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "scheduling_algorithm_duration_seconds", Help: "Scheduling algorithm latency in seconds", Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, }, ) SchedulerGoroutines = metrics.NewGaugeVec( &metrics.GaugeOpts{ Subsystem: SchedulerSubsystem, Name: "scheduler_goroutines", Help: "Number of running goroutines split by the work they do such as binding.", StabilityLevel: metrics.ALPHA, }, []string{"work"}) FrameworkExtensionPointDuration = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "framework_extension_point_duration_seconds", Help: "Latency for running all plugins of a specific extension point.", Buckets: metrics.ExponentialBuckets(0.0001, 2, 12), StabilityLevel: metrics.ALPHA, }, []string{"extension_point", "status", "profile"}) PluginExecutionDuration = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "plugin_execution_duration_seconds", Help: "Duration for running a plugin at a specific extension point.", Buckets: metrics.ExponentialBuckets(0.00001, 1.5, 20), StabilityLevel: metrics.ALPHA, }, []string{"plugin", "extension_point", "status"}) PermitWaitDuration = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "permit_wait_duration_seconds", Help: "Duration of waiting on permit.", Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, }, []string{"result"}) )
All the histogram based metrics have 1ms as size for the smallest bucket.
Functions ¶
func RegisterMetrics ¶
func RegisterMetrics(extraMetrics ...metrics.Registerable)
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 SinceInSeconds ¶
SinceInSeconds gets the time since the specified start in seconds.
func SubscriptionScheduleError ¶
SubscriptionScheduleError can record a scheduling attempt that had an error and the duration since `start`.
func SubscriptionScheduled ¶
SubscriptionScheduled can record a successful scheduling attempt and the duration since `start`.
func SubscriptionUnschedulable ¶
SubscriptionUnschedulable can record a scheduling attempt for an unschedulable subscription and the duration since `start`.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.