You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/30 08:23:14 UTC

[GitHub] [flink] xintongsong commented on a diff in pull request #20110: [FLINK-28308] Introduce metrics of the accumulated time that a running task is busy / idle / back-pressured

xintongsong commented on code in PR #20110:
URL: https://github.com/apache/flink/pull/20110#discussion_r910743907


##########
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/TaskIOMetricGroup.java:
##########
@@ -71,6 +75,7 @@ public class TaskIOMetricGroup extends ProxyMetricGroup<TaskMetricGroup> {
 
     public TaskIOMetricGroup(TaskMetricGroup parent) {
         super(parent);
+        this.taskStartTime = System.currentTimeMillis();

Review Comment:
   The timestamp of creating this metric group does not equals to the timestamp the task start processing. The difference in between sometimes can be quite large, e.g., restoring a large state.
   
   I think we should add a trigger in this metric group and pull it in `StreamTask#invoke`, right before `runMailboxLoop()`.



-- 
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-unsubscribe@flink.apache.org

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