mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
feature(scheduler): implement plugin_evaluation_total metric
This commit is contained in:
parent
eabb70833a
commit
4f7717842c
@ -734,6 +734,7 @@ func (f *frameworkImpl) RunFilterPlugins(
|
||||
if state.SkipFilterPlugins.Has(pl.Name()) {
|
||||
continue
|
||||
}
|
||||
metrics.PluginEvaluationTotal.WithLabelValues(pl.Name(), Filter).Inc()
|
||||
if status := f.runFilterPlugin(ctx, pl, state, pod, nodeInfo); !status.IsSuccess() {
|
||||
if !status.IsUnschedulable() {
|
||||
// Filter plugins are not supposed to return any status other than
|
||||
|
@ -189,6 +189,14 @@ var (
|
||||
StabilityLevel: metrics.ALPHA,
|
||||
}, []string{"plugin", "profile"})
|
||||
|
||||
PluginEvaluationTotal = metrics.NewCounterVec(
|
||||
&metrics.CounterOpts{
|
||||
Subsystem: SchedulerSubsystem,
|
||||
Name: "plugin_evaluation_total",
|
||||
Help: "Number of attempts to schedule pods by each plugin and the extension point (only Filter is supported now.).",
|
||||
StabilityLevel: metrics.ALPHA,
|
||||
}, []string{"plugin", "extension_point"})
|
||||
|
||||
metricsList = []metrics.Registerable{
|
||||
scheduleAttempts,
|
||||
e2eSchedulingLatency,
|
||||
@ -207,6 +215,7 @@ var (
|
||||
PermitWaitDuration,
|
||||
CacheSize,
|
||||
unschedulableReasons,
|
||||
PluginEvaluationTotal,
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user