cleanup constants for scheduler metrics

This commit is contained in:
KeZhang
2020-12-11 14:22:20 +08:00
parent 6e41006e1d
commit 1208c53c8b
3 changed files with 6 additions and 9 deletions

View File

@@ -542,8 +542,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() {