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


##########
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:
   Removing.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to