Merge pull request #97221 from 249043822/br-scheduler-metrics

cleanup constants for scheduler metrics
This commit is contained in:
Kubernetes Prow Robot
2020-12-14 17:45:56 -08:00
committed by GitHub
3 changed files with 6 additions and 9 deletions

View File

@@ -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() {