pbacsko commented on code in PR #1012:
URL: https://github.com/apache/yunikorn-core/pull/1012#discussion_r1958650332


##########
pkg/metrics/queue.go:
##########
@@ -99,15 +100,15 @@ func InitQueueMetrics(name string) *QueueMetrics {
                        Namespace:   Namespace,
                        Name:        "queue_resource",
                        ConstLabels: prometheus.Labels{"queue": name},
-                       Help:        "Queue resource metrics. State of the 
resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`.",
+                       Help:        "Queue resource metrics. State of the 
resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`, 
'maxRunningApps'.",

Review Comment:
   nit: please use backquotes (`) instead of single quotation marks (').



##########
pkg/metrics/queue.go:
##########
@@ -99,15 +100,15 @@ func InitQueueMetrics(name string) *QueueMetrics {
                        Namespace:   Namespace,
                        Name:        "queue_resource",
                        ConstLabels: prometheus.Labels{"queue": name},
-                       Help:        "Queue resource metrics. State of the 
resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`.",
+                       Help:        "Queue resource metrics. State of the 
resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`, 
'maxRunningApps'.",
                }, []string{"state", "resource"})
 
        q.resourceMetricsSubsystem = prometheus.NewGaugeVec(
                prometheus.GaugeOpts{
                        Namespace: Namespace,
                        Subsystem: replaceStr,
                        Name:      "queue_resource",
-                       Help:      "Queue resource metrics. State of the 
resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`.",
+                       Help:      "Queue resource metrics. State of the 
resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`, 
'maxRunningApps'.",

Review Comment:
   nit: please use backquotes (`) instead of single quotation marks (').



##########
pkg/scheduler/objects/queue_test.go:
##########
@@ -334,16 +338,18 @@ 
yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 0
        want = concatQueueResourceMetric(metrics, []string{`
 yunikorn_root_queue_resource{resource="memory",state="pending"} 0
 yunikorn_root_queue_resource{resource="vcores",state="pending"} 0
+yunikorn_root_queue_resource{resource="apps",state="maxRunningApps"} 0
 `, `
 yunikorn_root_leaf_queue_resource{resource="memory",state="pending"} 0
 yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 0
+yunikorn_root_leaf_queue_resource{resource="apps",state="maxRunningApps"} 0
 `},
        )
        assert.NilError(t, promtu.GatherAndCompare(prometheus.DefaultGatherer, 
strings.NewReader(want), metrics...), "unexpected metrics")
 }
 
 const (
-       QueueResourceMetricHelp = "# HELP %v Queue resource metrics. State of 
the resource includes `guaranteed`, `max`, `allocated`, `pending`, 
`preempting`."
+       QueueResourceMetricHelp = "# HELP %v Queue resource metrics. State of 
the resource includes `guaranteed`, `max`, `allocated`, `pending`, 
`preempting`, 'maxRunningApps'."

Review Comment:
   nit: please use backquotes (`) instead of single quotation marks (').



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to