@@ -55,8 +55,8 @@ func StartMetricsLogger(ctx context.Context, datastore Datastore, refreshPrometh
55
55
case <- ctx .Done ():
56
56
logger .V (logutil .DEFAULT ).Info ("Shutting down prometheus metrics thread" )
57
57
return
58
- case <- ticker .C : // Periodically flush prometheus metrics for inference pool
59
- flushPrometheusMetricsOnce (logger , datastore )
58
+ case <- ticker .C : // Periodically refresh prometheus metrics for inference pool
59
+ refreshPrometheusMetrics (logger , datastore )
60
60
}
61
61
}
62
62
}()
@@ -86,19 +86,19 @@ func StartMetricsLogger(ctx context.Context, datastore Datastore, refreshPrometh
86
86
}
87
87
}
88
88
89
- func flushPrometheusMetricsOnce (logger logr.Logger , datastore Datastore ) {
89
+ func refreshPrometheusMetrics (logger logr.Logger , datastore Datastore ) {
90
90
pool , err := datastore .PoolGet ()
91
91
if err != nil {
92
92
// No inference pool or not initialize.
93
- logger .V (logutil .DEFAULT ).Info ("pool is not initialized, skipping flushing metrics" )
93
+ logger .V (logutil .DEBUG ).Info ("Pool is not initialized, skipping refreshing metrics" )
94
94
return
95
95
}
96
96
97
97
var kvCacheTotal float64
98
98
var queueTotal int
99
99
100
100
podMetrics := datastore .PodGetAll ()
101
- logger .V (logutil .TRACE ).Info ("Flushing Prometheus Metrics" , "ReadyPods" , len (podMetrics ))
101
+ logger .V (logutil .TRACE ).Info ("Refreshing Prometheus Metrics" , "ReadyPods" , len (podMetrics ))
102
102
if len (podMetrics ) == 0 {
103
103
return
104
104
}
0 commit comments