carlvinhust2012 commented on code in PR #9887:
URL: https://github.com/apache/incubator-doris/pull/9887#discussion_r885603919


##########
be/src/util/system_metrics.cpp:
##########
@@ -718,4 +788,174 @@ void SystemMetrics::get_max_net_traffic(const 
std::map<std::string, int64_t>& ls
     *send_rate = max_send / interval_sec;
     *rcv_rate = max_rcv / interval_sec;
 }
+
+void SystemMetrics::_install_proc_metrics(MetricEntity* entity) {
+    _proc_metrics.reset(new ProcMetrics(entity));
+}
+
+void SystemMetrics::_update_proc_metrics() {
+#ifdef BE_TEST
+    FILE* fp = fopen(k_ut_stat_path, "r");
+#else
+    FILE* fp = fopen("/proc/stat", "r");

Review Comment:
   because I want to keep the style with the old code.



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

Reply via email to