mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
cleanup constants for scheduler metrics
This commit is contained in:
parent
6e41006e1d
commit
1208c53c8b
@ -525,9 +525,9 @@ func (g *genericScheduler) prioritizeNodes(
|
|||||||
}
|
}
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(extIndex int) {
|
go func(extIndex int) {
|
||||||
metrics.SchedulerGoroutines.WithLabelValues("prioritizing_extender").Inc()
|
metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Inc()
|
||||||
defer func() {
|
defer func() {
|
||||||
metrics.SchedulerGoroutines.WithLabelValues("prioritizing_extender").Dec()
|
metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Dec()
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
prioritizedList, weight, err := g.extenders[extIndex].Prioritize(pod, nodes)
|
prioritizedList, weight, err := g.extenders[extIndex].Prioritize(pod, nodes)
|
||||||
|
@ -28,13 +28,10 @@ import (
|
|||||||
const (
|
const (
|
||||||
// SchedulerSubsystem - subsystem name used by scheduler
|
// SchedulerSubsystem - subsystem name used by scheduler
|
||||||
SchedulerSubsystem = "scheduler"
|
SchedulerSubsystem = "scheduler"
|
||||||
|
|
||||||
// OperationLabel - operation label name
|
|
||||||
OperationLabel = "operation"
|
|
||||||
// Below are possible values for the operation label. Each represents a substep of e2e scheduling:
|
// 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).
|
// PrioritizingExtender - prioritizing extender operation label value
|
||||||
PreemptionEvaluation = "preemption_evaluation"
|
PrioritizingExtender = "prioritizing_extender"
|
||||||
// Binding - binding operation label value
|
// Binding - binding operation label value
|
||||||
Binding = "binding"
|
Binding = "binding"
|
||||||
// E2eScheduling - e2e scheduling operation label value
|
// E2eScheduling - e2e scheduling operation label value
|
||||||
|
@ -542,8 +542,8 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
|
|||||||
go func() {
|
go func() {
|
||||||
bindingCycleCtx, cancel := context.WithCancel(ctx)
|
bindingCycleCtx, cancel := context.WithCancel(ctx)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
metrics.SchedulerGoroutines.WithLabelValues("binding").Inc()
|
metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Inc()
|
||||||
defer metrics.SchedulerGoroutines.WithLabelValues("binding").Dec()
|
defer metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Dec()
|
||||||
|
|
||||||
waitOnPermitStatus := fwk.WaitOnPermit(bindingCycleCtx, assumedPod)
|
waitOnPermitStatus := fwk.WaitOnPermit(bindingCycleCtx, assumedPod)
|
||||||
if !waitOnPermitStatus.IsSuccess() {
|
if !waitOnPermitStatus.IsSuccess() {
|
||||||
|
Loading…
Reference in New Issue
Block a user