github-actions[bot] commented on code in PR #33331:
URL: https://github.com/apache/doris/pull/33331#discussion_r1557495506


##########
be/src/runtime/plan_fragment_executor.cpp:
##########
@@ -638,10 +640,41 @@ void PlanFragmentExecutor::close() {
                 load_channel_profile()->pretty_print(&ss);
             }
             LOG(INFO) << ss.str();
+
+            _query_ctx->add_instance_profile(_fragment_instance_id,
+                                             collect_realtime_query_profile(),
+                                             
collect_realtime_load_channel_profile());
         }
     }
 
     _closed = true;
 }
 
+std::shared_ptr<TRuntimeProfileTree> 
PlanFragmentExecutor::collect_realtime_query_profile() const {
+    std::shared_ptr<TRuntimeProfileTree> res = 
std::make_shared<TRuntimeProfileTree>();
+
+    if (_runtime_state != nullptr) {
+        _runtime_state->runtime_profile()->compute_time_in_profile();
+        _runtime_state->runtime_profile()->to_thrift(res.get());
+    } else {
+        return nullptr;
+    }
+
+    return res;
+}
+
+std::shared_ptr<TRuntimeProfileTree> 
PlanFragmentExecutor::collect_realtime_load_channel_profile()

Review Comment:
   warning: method 'collect_realtime_load_channel_profile' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/runtime/plan_fragment_executor.h:150:
   ```diff
   -     std::shared_ptr<TRuntimeProfileTree> 
collect_realtime_load_channel_profile() const;
   +     static std::shared_ptr<TRuntimeProfileTree> 
collect_realtime_load_channel_profile() ;
   ```
   
   be/src/runtime/plan_fragment_executor.cpp:666:
   ```diff
   -         const {
   +         {
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to