diff --git a/pkg/metrics/resource.go b/pkg/metrics/resource.go index 71e96d8715ec..3555f019492d 100644 --- a/pkg/metrics/resource.go +++ b/pkg/metrics/resource.go @@ -22,24 +22,24 @@ const ( var ( findMatchedPolicyDurationHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Name: resourceMatchPolicyDurationMetricsName, - Help: "Duration in seconds to find a matched propagation policy for the resource template.", + Help: "Duration in seconds to find a matched PropagationPolicy or ClusterPropagationPolicy for the resource templates.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 12), }, []string{}) applyPolicyDurationHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Name: resourceApplyPolicyDurationMetricsName, - Help: "Duration in seconds to apply a propagation policy for the resource template. By the result, 'error' means a resource template failed to apply the policy. Otherwise 'success'.", + Help: "Duration in seconds to apply a PropagationPolicy or ClusterPropagationPolicy for the resource templates. By the result, 'error' means a resource template failed to apply the policy. Otherwise 'success'.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 12), }, []string{"result"}) policyApplyAttempts = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: policyApplyAttemptsMetricsName, - Help: "Number of attempts to be applied for a propagation policy. By the result, 'error' means a resource template failed to apply the policy. Otherwise 'success'.", + Help: "Number of attempts to be applied for a PropagationPolicy or ClusterPropagationPolicy. By the result, 'error' means a resource template failed to apply the policy. Otherwise 'success'.", }, []string{"result"}) syncWorkDurationHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Name: syncWorkDurationMetricsName, - Help: "Duration in seconds to sync works for a binding object. By the result, 'error' means a binding failed to sync works. Otherwise 'success'.", + Help: "Duration in seconds to sync works for ResourceBinding and ClusterResourceBinding objects. By the result, 'error' means a binding failed to sync works. Otherwise 'success'.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 12), }, []string{"result"}) diff --git a/pkg/scheduler/metrics/metrics.go b/pkg/scheduler/metrics/metrics.go index 0636ddf86a4b..b5ff048fdc74 100644 --- a/pkg/scheduler/metrics/metrics.go +++ b/pkg/scheduler/metrics/metrics.go @@ -46,7 +46,7 @@ var ( prometheus.CounterOpts{ Subsystem: SchedulerSubsystem, Name: "schedule_attempts_total", - Help: "Number of attempts to schedule resourceBinding", + Help: "Number of attempts to schedule a ResourceBinding or ClusterResourceBinding", }, []string{"result", "schedule_type"}) e2eSchedulingLatency = prometheus.NewHistogramVec( @@ -65,12 +65,12 @@ var ( Buckets: prometheus.ExponentialBuckets(0.001, 2, 15), }, []string{"schedule_step"}) - // SchedulerQueueIncomingBindings is the number of bindings added to scheduling queues by event type. + // SchedulerQueueIncomingBindings is the Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. SchedulerQueueIncomingBindings = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: SchedulerSubsystem, Name: "queue_incoming_bindings_total", - Help: "Number of bindings added to scheduling queues by event type.", + Help: "Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type.", }, []string{"event"}) // FrameworkExtensionPointDuration is the metrics which indicates the latency for running all plugins of a specific extension point. diff --git a/pkg/scheduler/scheduler_metrics_test.go b/pkg/scheduler/scheduler_metrics_test.go index fe2cfd145827..6a92b8bec001 100644 --- a/pkg/scheduler/scheduler_metrics_test.go +++ b/pkg/scheduler/scheduler_metrics_test.go @@ -100,7 +100,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: false, trigger: addBinding, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="BindingAdd"} 3 `, @@ -110,7 +110,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: false, trigger: updateBinding, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="BindingUpdate"} 3 `, @@ -120,7 +120,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: false, trigger: policyChanged, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="PolicyChanged"} 3 `, @@ -130,7 +130,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: true, trigger: crbPolicyChanged, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="PolicyChanged"} 3 `, @@ -140,7 +140,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: false, trigger: clusterChanged, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="ClusterChanged"} 3 `, @@ -150,7 +150,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: true, trigger: crbClusterChanged, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="ClusterChanged"} 3 `, @@ -166,7 +166,7 @@ func TestIncomingBindingMetrics(t *testing.T) { crbInvolved: false, trigger: scheduleAttemptFailure, want: ` - # HELP karmada_scheduler_queue_incoming_bindings_total Number of bindings added to scheduling queues by event type. + # HELP karmada_scheduler_queue_incoming_bindings_total Number of ResourceBinding and ClusterResourceBinding objects added to scheduling queues by event type. # TYPE karmada_scheduler_queue_incoming_bindings_total counter karmada_scheduler_queue_incoming_bindings_total{event="ScheduleAttemptFailure"} 3 `,