From 7be3f8e43f73422ac622f12b9894814997b7d37a Mon Sep 17 00:00:00 2001 From: kerthcet Date: Wed, 3 May 2023 00:35:38 +0800 Subject: [PATCH] Remove old metric scheduler_goroutines Signed-off-by: kerthcet --- pkg/scheduler/metrics/metrics.go | 11 ----------- pkg/scheduler/schedule_one.go | 4 ---- 2 files changed, 15 deletions(-) diff --git a/pkg/scheduler/metrics/metrics.go b/pkg/scheduler/metrics/metrics.go index 5ee59a430f0..c76e1a28d64 100644 --- a/pkg/scheduler/metrics/metrics.go +++ b/pkg/scheduler/metrics/metrics.go @@ -106,16 +106,6 @@ var ( Help: "Number of pending pods, by the queue type. 'active' means number of pods in activeQ; 'backoff' means number of pods in backoffQ; 'unschedulable' means number of pods in unschedulablePods that the scheduler attempted to schedule and failed; 'gated' is the number of unschedulable pods that the scheduler never attempted to schedule because they are gated.", StabilityLevel: metrics.STABLE, }, []string{"queue"}) - // SchedulerGoroutines isn't called in some parts where goroutines start. - // Goroutines metric replaces SchedulerGoroutines metric. Goroutine metric tracks all goroutines. - SchedulerGoroutines = metrics.NewGaugeVec( - &metrics.GaugeOpts{ - Subsystem: SchedulerSubsystem, - DeprecatedVersion: "1.26.0", - Name: "scheduler_goroutines", - Help: "Number of running goroutines split by the work they do such as binding. This metric is replaced by the \"goroutines\" metric.", - StabilityLevel: metrics.ALPHA, - }, []string{"work"}) Goroutines = metrics.NewGaugeVec( &metrics.GaugeOpts{ Subsystem: SchedulerSubsystem, @@ -220,7 +210,6 @@ var ( FrameworkExtensionPointDuration, PluginExecutionDuration, SchedulerQueueIncomingPods, - SchedulerGoroutines, Goroutines, PermitWaitDuration, CacheSize, diff --git a/pkg/scheduler/schedule_one.go b/pkg/scheduler/schedule_one.go index eabd07d4c96..842c0636d7d 100644 --- a/pkg/scheduler/schedule_one.go +++ b/pkg/scheduler/schedule_one.go @@ -102,8 +102,6 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) { bindingCycleCtx, cancel := context.WithCancel(ctx) defer cancel() - metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Inc() - defer metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Dec() metrics.Goroutines.WithLabelValues(metrics.Binding).Inc() defer metrics.Goroutines.WithLabelValues(metrics.Binding).Dec() @@ -686,10 +684,8 @@ func prioritizeNodes( } wg.Add(1) go func(extIndex int) { - metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Inc() metrics.Goroutines.WithLabelValues(metrics.PrioritizingExtender).Inc() defer func() { - metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Dec() metrics.Goroutines.WithLabelValues(metrics.PrioritizingExtender).Dec() wg.Done() }()