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


##########
be/src/runtime/query_context.cpp:
##########
@@ -131,4 +131,19 @@ std::shared_ptr<QueryStatistics> 
QueryContext::get_query_statistics() {
             print_id(_query_id));
 }
 
+void QueryContext::register_mem_tracker_statistics() {

Review Comment:
   warning: method 'register_mem_tracker_statistics' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/runtime/query_context.h:214:
   ```diff
   -     void register_mem_tracker_statistics();
   +     static void register_mem_tracker_statistics();
   ```
   



##########
be/src/runtime/query_context.cpp:
##########
@@ -131,4 +131,19 @@
             print_id(_query_id));
 }
 
+void QueryContext::register_mem_tracker_statistics() {
+    if (query_mem_tracker) {
+        _exec_env->runtime_query_statistics_mgr()->register_query_statistics(
+                print_id(_query_id), 
query_mem_tracker->get_query_statistics(), coord_addr);
+    }
+}
+
+void QueryContext::register_cpu_statistics() {

Review Comment:
   warning: method 'register_cpu_statistics' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/runtime/query_context.h:216:
   ```diff
   -     void register_cpu_statistics();
   +     static void register_cpu_statistics();
   ```
   



##########
be/src/runtime/runtime_query_statistics_mgr.cpp:
##########
@@ -24,14 +24,22 @@
 
 namespace doris {
 
+void QueryStatisticsCtx::collect_query_statistics(TQueryStatistics* tq_s) {

Review Comment:
   warning: method 'collect_query_statistics' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
   static void QueryStatisticsCtx::collect_query_statistics(TQueryStatistics* 
tq_s) {
   ```
   



##########
be/src/runtime/runtime_query_statistics_mgr.h:
##########
@@ -26,15 +26,18 @@ namespace doris {
 
 class QueryStatisticsCtx {
 public:
-    QueryStatisticsCtx(TNetworkAddress fe_addr) : fe_addr(fe_addr) {
-        this->is_query_finished = false;
+    QueryStatisticsCtx(TNetworkAddress fe_addr) : _fe_addr(fe_addr) {
+        this->_is_query_finished = false;
     }
     ~QueryStatisticsCtx() = default;
 
-    std::vector<std::shared_ptr<QueryStatistics>> qs_list;
-    bool is_query_finished;
-    TNetworkAddress fe_addr;
-    int64_t query_finish_time;
+    void collect_query_statistics(TQueryStatistics* tq_s);
+
+public:

Review Comment:
   warning: redundant access specifier has the same accessibility as the 
previous access specifier [readability-redundant-access-specifiers]
   
   ```suggestion
   
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/runtime/runtime_query_statistics_mgr.h:27:** previously declared 
here
   ```cpp
   public:
   ^
   ```
   
   </details>
   



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