EMsnap commented on code in PR #8970:
URL: https://github.com/apache/inlong/pull/8970#discussion_r1333945006


##########
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/source/reader/InlongIcebergSourceReaderMetrics.java:
##########
@@ -48,8 +52,29 @@ public void registerMetrics(MetricOption metricOption) {
 
     public void outputMetricsWithEstimate(ArrayBatchRecords batchRecord) {
         if (sourceMetricData != null) {
-            sourceMetricData.outputMetricsWithEstimate(batchRecord.records());
+            int dataCount = batchRecord.numberOfRecords();
+            Object[] records = batchRecord.records();
+            for (int i = 0; i < dataCount; i++) {
+                long dataSize = getDataSize(records[i]);
+                long dataTime = getDataTime(records[i]);
+                sourceMetricData.outputMetrics(1, dataSize, dataTime);
+            }
+
         }
+    }
 
+    private long getDataTime(Object object) {

Review Comment:
   maybe change to Object data to make more sense 



-- 
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