@@ -298,9 +298,11 @@ func TestPendingCalc(t *testing.T) {
298
298
want := concatQueueResourceMetric (metrics , []string {`
299
299
yunikorn_root_queue_resource{resource="memory",state="pending"} 100
300
300
yunikorn_root_queue_resource{resource="vcores",state="pending"} 10
301
+ yunikorn_root_queue_resource{resource="apps",state="maxRunningApps"} 0
301
302
` , `
302
303
yunikorn_root_leaf_queue_resource{resource="memory",state="pending"} 100
303
304
yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 10
305
+ yunikorn_root_leaf_queue_resource{resource="apps",state="maxRunningApps"} 0
304
306
` },
305
307
)
306
308
assert .NilError (t , promtu .GatherAndCompare (prometheus .DefaultGatherer , strings .NewReader (want ), metrics ... ), "unexpected metrics" )
@@ -314,9 +316,11 @@ yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 10
314
316
want = concatQueueResourceMetric (metrics , []string {`
315
317
yunikorn_root_queue_resource{resource="memory",state="pending"} 0
316
318
yunikorn_root_queue_resource{resource="vcores",state="pending"} 0
319
+ yunikorn_root_queue_resource{resource="apps",state="maxRunningApps"} 0
317
320
` , `
318
321
yunikorn_root_leaf_queue_resource{resource="memory",state="pending"} 0
319
322
yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 0
323
+ yunikorn_root_leaf_queue_resource{resource="apps",state="maxRunningApps"} 0
320
324
` },
321
325
)
322
326
assert .NilError (t , promtu .GatherAndCompare (prometheus .DefaultGatherer , strings .NewReader (want ), metrics ... ), "unexpected metrics" )
@@ -334,16 +338,18 @@ yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 0
334
338
want = concatQueueResourceMetric (metrics , []string {`
335
339
yunikorn_root_queue_resource{resource="memory",state="pending"} 0
336
340
yunikorn_root_queue_resource{resource="vcores",state="pending"} 0
341
+ yunikorn_root_queue_resource{resource="apps",state="maxRunningApps"} 0
337
342
` , `
338
343
yunikorn_root_leaf_queue_resource{resource="memory",state="pending"} 0
339
344
yunikorn_root_leaf_queue_resource{resource="vcores",state="pending"} 0
345
+ yunikorn_root_leaf_queue_resource{resource="apps",state="maxRunningApps"} 0
340
346
` },
341
347
)
342
348
assert .NilError (t , promtu .GatherAndCompare (prometheus .DefaultGatherer , strings .NewReader (want ), metrics ... ), "unexpected metrics" )
343
349
}
344
350
345
351
const (
346
- QueueResourceMetricHelp = "# HELP %v Queue resource metrics. State of the resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`."
352
+ QueueResourceMetricHelp = "# HELP %v Queue resource metrics. State of the resource includes `guaranteed`, `max`, `allocated`, `pending`, `preempting`, `maxRunningApps` ."
347
353
QueueResourceMetricType = "# TYPE %v gauge"
348
354
)
349
355
0 commit comments