gyfora commented on code in PR #762:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/762#discussion_r1482812605


##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/ScalingMetricEvaluator.java:
##########
@@ -314,13 +315,19 @@ protected static Map<ScalingMetric, 
EvaluatedScalingMetric> evaluateGlobalMetric
         var out = new HashMap<ScalingMetric, EvaluatedScalingMetric>();
 
         var gcPressure = latest.getOrDefault(GC_PRESSURE, Double.NaN);
-        var lastHeapUsage = latest.getOrDefault(HEAP_USAGE, Double.NaN);
+        var lastHeapUsage = latest.getOrDefault(HEAP_MAX_USAGE_RATIO, 
Double.NaN);
 
         out.put(GC_PRESSURE, EvaluatedScalingMetric.of(gcPressure));
         out.put(
-                HEAP_USAGE,
+                HEAP_MAX_USAGE_RATIO,
                 new EvaluatedScalingMetric(
-                        lastHeapUsage, getAverageGlobalMetric(HEAP_USAGE, 
metricHistory)));
+                        lastHeapUsage,
+                        getAverageGlobalMetric(HEAP_MAX_USAGE_RATIO, 
metricHistory)));
+
+        var latestObservation = latest.getOrDefault(HEAP_AVERAGE_SIZE, 
Double.NaN);
+        double heapSizeAverage = getAverageGlobalMetric(HEAP_AVERAGE_SIZE, 
metricHistory);
+        LOG.debug("Latest: {}, Avg: {}", latestObservation, heapSizeAverage);

Review Comment:
   ""Latest: 100, Avg: 400" doesn't really mean anything. We can keep it but 
then we should add some more info the log 



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to