@@ -377,8 +377,8 @@ func TestPromToPodMetrics(t *testing.T) {
377377 name string
378378 metricFamilies map [string ]* dto.MetricFamily
379379 mapping * MetricMapping
380- existingMetrics * Metrics
381- expectedMetrics * Metrics
380+ existingMetrics * MetricsState
381+ expectedMetrics * MetricsState
382382 expectedErr error // Count of expected errors
383383 }{
384384 {
@@ -401,8 +401,8 @@ func TestPromToPodMetrics(t *testing.T) {
401401 KVCacheUtilization : & MetricSpec {MetricName : "vllm_usage" },
402402 LoraRequestInfo : & MetricSpec {MetricName : "vllm:lora_requests_info" },
403403 },
404- existingMetrics : & Metrics {},
405- expectedMetrics : & Metrics {
404+ existingMetrics : & MetricsState {},
405+ expectedMetrics : & MetricsState {
406406 WaitingQueueSize : 7 ,
407407 KVCacheUsagePercent : 0.8 ,
408408 ActiveModels : map [string ]int {"lora1" : 0 , "lora2" : 0 },
@@ -418,8 +418,8 @@ func TestPromToPodMetrics(t *testing.T) {
418418 KVCacheUtilization : & MetricSpec {MetricName : "vllm_usage" },
419419 LoraRequestInfo : & MetricSpec {MetricName : "vllm:lora_requests_info" },
420420 },
421- existingMetrics : & Metrics {ActiveModels : map [string ]int {}, WaitingModels : map [string ]int {}},
422- expectedMetrics : & Metrics {ActiveModels : map [string ]int {}, WaitingModels : map [string ]int {}},
421+ existingMetrics : & MetricsState {ActiveModels : map [string ]int {}, WaitingModels : map [string ]int {}},
422+ expectedMetrics : & MetricsState {ActiveModels : map [string ]int {}, WaitingModels : map [string ]int {}},
423423 expectedErr : multierr .Combine (errors .New ("metric family \" vllm_waiting\" not found" ), errors .New ("metric family \" vllm_usage\" not found" ), errors .New ("metric family \" vllm:lora_requests_info\" not found" )),
424424 },
425425 {
@@ -437,8 +437,8 @@ func TestPromToPodMetrics(t *testing.T) {
437437 KVCacheUtilization : & MetricSpec {MetricName : "vllm_usage" },
438438 LoraRequestInfo : & MetricSpec {MetricName : "vllm:lora_requests_info" },
439439 },
440- existingMetrics : & Metrics {},
441- expectedMetrics : & Metrics {
440+ existingMetrics : & MetricsState {},
441+ expectedMetrics : & MetricsState {
442442 WaitingQueueSize : 0 ,
443443 KVCacheUsagePercent : 0.8 ,
444444 ActiveModels : map [string ]int {"lora1" : 0 , "lora2" : 0 },
@@ -457,8 +457,8 @@ func TestPromToPodMetrics(t *testing.T) {
457457 mapping : & MetricMapping {
458458 LoraRequestInfo : & MetricSpec {MetricName : "vllm:lora_requests_info" },
459459 },
460- existingMetrics : & Metrics {},
461- expectedMetrics : & Metrics {
460+ existingMetrics : & MetricsState {},
461+ expectedMetrics : & MetricsState {
462462 ActiveModels : map [string ]int {"lora1" : 0 },
463463 WaitingModels : map [string ]int {},
464464 MaxActiveModels : 0 , // Should still default to 0.
@@ -494,7 +494,7 @@ func TestFetchMetrics(t *testing.T) {
494494 Name : "pod" ,
495495 },
496496 }
497- existing := & Metrics {}
497+ existing := & MetricsState {}
498498 p := & PodMetricsClientImpl {} // No MetricMapping needed for this basic test
499499
500500 _ , err := p .FetchMetrics (ctx , pod , existing , 9999 ) // Use a port that's unlikely to be in use.
0 commit comments