You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morningman (via GitHub)" <gi...@apache.org> on 2024/10/14 04:06:10 UTC

[PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

morningman opened a new pull request, #41785:
URL: https://github.com/apache/doris/pull/41785

   (no comment)


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

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


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


Re: [PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #41785: [feature](workload-policy) add cpu time as condition to cancel the query
URL: https://github.com/apache/doris/pull/41785


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

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


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


Re: [PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41785:
URL: https://github.com/apache/doris/pull/41785#issuecomment-2409902577

   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
   
   Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
   See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).


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

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


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


Re: [PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #41785:
URL: https://github.com/apache/doris/pull/41785#discussion_r1799751416


##########
be/src/runtime/runtime_query_statistics_mgr.h:
##########
@@ -103,6 +103,42 @@ class RuntimeQueryStatisticsMgr {
                                    std::vector<std::shared_ptr<TRuntimeProfileTree>> p_profiles,
                                    std::shared_ptr<TRuntimeProfileTree> load_channel_profile_x);
 
+private:
+    void get_cpu_time();
+
+    struct CPUData {
+        unsigned long long user;
+        unsigned long long nice;
+        unsigned long long system;
+        unsigned long long idle;
+        unsigned long long iowait;
+        unsigned long long irq;
+        unsigned long long softirq;
+        unsigned long long steal;
+        unsigned long long guest;
+        unsigned long long guest_nice;
+    };
+
+    CPUData parseCPUData(const std::string& line) {
+        CPUData data;
+        std::istringstream iss(line);
+        std::string cpu;
+        iss >> cpu >> data.user >> data.nice >> data.system >> data.idle >> data.iowait
+            >> data.irq >> data.softirq >> data.steal >> data.guest >> data.guest_nice;
+        return data;
+    }
+    
+    unsigned long long getIdleTime(const CPUData& data) {
+        return data.idle + data.iowait;
+    }
+    
+    unsigned long long getActiveTime(const CPUData& data) {
+        return data.user + data.nice + data.system + data.irq + data.softirq + data.steal + data.guest + data.guest_nice;
+    }
+
+    CPUData _prevData;
+    bool first = true;
+
 private:

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:105:** previously declared here
   ```cpp
   private:
   ^
   ```
   
   </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-unsubscribe@doris.apache.org

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


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


Re: [PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41785:
URL: https://github.com/apache/doris/pull/41785#issuecomment-2409906327

   clang-tidy review says "All clean, LGTM! :+1:"


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

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


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


Re: [PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed pull request #41785: [feature](workload-policy) add cpu time as condition to cancel the query
URL: https://github.com/apache/doris/pull/41785


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

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


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


Re: [PR] [feature](workload-policy) add cpu time as condition to cancel the query [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41785:
URL: https://github.com/apache/doris/pull/41785#issuecomment-3331135767

   We're closing this PR because it hasn't been updated in a while.
   This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!


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

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


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