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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]