mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #95001 from arghya88/deprecate-scheduler-metrics
deprecate scheduler metrics
This commit is contained in:
commit
44cd4fcedc
@ -79,7 +79,7 @@ func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy
|
|||||||
preemptionStartTime := time.Now()
|
preemptionStartTime := time.Now()
|
||||||
defer func() {
|
defer func() {
|
||||||
metrics.PreemptionAttempts.Inc()
|
metrics.PreemptionAttempts.Inc()
|
||||||
metrics.SchedulingAlgorithmPreemptionEvaluationDuration.Observe(metrics.SinceInSeconds(preemptionStartTime))
|
metrics.DeprecatedSchedulingAlgorithmPreemptionEvaluationDuration.Observe(metrics.SinceInSeconds(preemptionStartTime))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
nnn, err := pl.preempt(ctx, state, pod, m)
|
nnn, err := pl.preempt(ctx, state, pod, m)
|
||||||
|
@ -67,22 +67,24 @@ var (
|
|||||||
StabilityLevel: metrics.ALPHA,
|
StabilityLevel: metrics.ALPHA,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
SchedulingAlgorithmPreemptionEvaluationDuration = metrics.NewHistogram(
|
DeprecatedSchedulingAlgorithmPreemptionEvaluationDuration = metrics.NewHistogram(
|
||||||
&metrics.HistogramOpts{
|
&metrics.HistogramOpts{
|
||||||
Subsystem: SchedulerSubsystem,
|
Subsystem: SchedulerSubsystem,
|
||||||
Name: "scheduling_algorithm_preemption_evaluation_seconds",
|
Name: "scheduling_algorithm_preemption_evaluation_seconds",
|
||||||
Help: "Scheduling algorithm preemption evaluation duration in seconds",
|
Help: "Scheduling algorithm preemption evaluation duration in seconds",
|
||||||
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
|
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
|
||||||
StabilityLevel: metrics.ALPHA,
|
StabilityLevel: metrics.ALPHA,
|
||||||
|
DeprecatedVersion: "1.20.0",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
BindingLatency = metrics.NewHistogram(
|
DeprecatedBindingLatency = metrics.NewHistogram(
|
||||||
&metrics.HistogramOpts{
|
&metrics.HistogramOpts{
|
||||||
Subsystem: SchedulerSubsystem,
|
Subsystem: SchedulerSubsystem,
|
||||||
Name: "binding_duration_seconds",
|
Name: "binding_duration_seconds",
|
||||||
Help: "Binding latency in seconds",
|
Help: "Binding latency in seconds",
|
||||||
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
|
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
|
||||||
StabilityLevel: metrics.ALPHA,
|
StabilityLevel: metrics.ALPHA,
|
||||||
|
DeprecatedVersion: "1.20.0",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
PreemptionVictims = metrics.NewHistogram(
|
PreemptionVictims = metrics.NewHistogram(
|
||||||
@ -189,8 +191,8 @@ var (
|
|||||||
scheduleAttempts,
|
scheduleAttempts,
|
||||||
e2eSchedulingLatency,
|
e2eSchedulingLatency,
|
||||||
SchedulingAlgorithmLatency,
|
SchedulingAlgorithmLatency,
|
||||||
BindingLatency,
|
DeprecatedBindingLatency,
|
||||||
SchedulingAlgorithmPreemptionEvaluationDuration,
|
DeprecatedSchedulingAlgorithmPreemptionEvaluationDuration,
|
||||||
PreemptionVictims,
|
PreemptionVictims,
|
||||||
PreemptionAttempts,
|
PreemptionAttempts,
|
||||||
pendingPods,
|
pendingPods,
|
||||||
|
@ -412,7 +412,7 @@ func (sched *Scheduler) finishBinding(prof *profile.Profile, assumed *v1.Pod, ta
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics.BindingLatency.Observe(metrics.SinceInSeconds(start))
|
metrics.DeprecatedBindingLatency.Observe(metrics.SinceInSeconds(start))
|
||||||
prof.Recorder.Eventf(assumed, nil, v1.EventTypeNormal, "Scheduled", "Binding", "Successfully assigned %v/%v to %v", assumed.Namespace, assumed.Name, targetNode)
|
prof.Recorder.Eventf(assumed, nil, v1.EventTypeNormal, "Scheduled", "Binding", "Successfully assigned %v/%v to %v", assumed.Namespace, assumed.Name, targetNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user