mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #97221 from 249043822/br-scheduler-metrics
cleanup constants for scheduler metrics
This commit is contained in:
commit
989b2fd371
@ -525,9 +525,9 @@ func (g *genericScheduler) prioritizeNodes(
|
||||
}
|
||||
wg.Add(1)
|
||||
go func(extIndex int) {
|
||||
metrics.SchedulerGoroutines.WithLabelValues("prioritizing_extender").Inc()
|
||||
metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Inc()
|
||||
defer func() {
|
||||
metrics.SchedulerGoroutines.WithLabelValues("prioritizing_extender").Dec()
|
||||
metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Dec()
|
||||
wg.Done()
|
||||
}()
|
||||
prioritizedList, weight, err := g.extenders[extIndex].Prioritize(pod, nodes)
|
||||
|
@ -28,13 +28,10 @@ import (
|
||||
const (
|
||||
// SchedulerSubsystem - subsystem name used by scheduler
|
||||
SchedulerSubsystem = "scheduler"
|
||||
|
||||
// OperationLabel - operation label name
|
||||
OperationLabel = "operation"
|
||||
// Below are possible values for the operation label. Each represents a substep of e2e scheduling:
|
||||
|
||||
// PreemptionEvaluation - preemption evaluation operation label value (occurs in case of scheduling fitError).
|
||||
PreemptionEvaluation = "preemption_evaluation"
|
||||
// PrioritizingExtender - prioritizing extender operation label value
|
||||
PrioritizingExtender = "prioritizing_extender"
|
||||
// Binding - binding operation label value
|
||||
Binding = "binding"
|
||||
// E2eScheduling - e2e scheduling operation label value
|
||||
|
@ -540,8 +540,8 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
|
||||
go func() {
|
||||
bindingCycleCtx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
metrics.SchedulerGoroutines.WithLabelValues("binding").Inc()
|
||||
defer metrics.SchedulerGoroutines.WithLabelValues("binding").Dec()
|
||||
metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Inc()
|
||||
defer metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Dec()
|
||||
|
||||
waitOnPermitStatus := fwk.WaitOnPermit(bindingCycleCtx, assumedPod)
|
||||
if !waitOnPermitStatus.IsSuccess() {
|
||||
|
Loading…
Reference in New Issue
Block a user