Skip to content

Commit ce10701

Browse files
committed
rename flush metrics to refresh metrics
Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent 65fa1ab commit ce10701

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/epp/backend/metrics/logger.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ func StartMetricsLogger(ctx context.Context, datastore Datastore, refreshPrometh
5555
case <-ctx.Done():
5656
logger.V(logutil.DEFAULT).Info("Shutting down prometheus metrics thread")
5757
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)
6060
}
6161
}
6262
}()
@@ -86,19 +86,19 @@ func StartMetricsLogger(ctx context.Context, datastore Datastore, refreshPrometh
8686
}
8787
}
8888

89-
func flushPrometheusMetricsOnce(logger logr.Logger, datastore Datastore) {
89+
func refreshPrometheusMetrics(logger logr.Logger, datastore Datastore) {
9090
pool, err := datastore.PoolGet()
9191
if err != nil {
9292
// 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")
9494
return
9595
}
9696

9797
var kvCacheTotal float64
9898
var queueTotal int
9999

100100
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))
102102
if len(podMetrics) == 0 {
103103
return
104104
}

0 commit comments

Comments
 (0)