You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/02/15 06:52:41 UTC

[GitHub] [dolphinscheduler] zhongjiajie commented on a change in pull request #8390: [Fix-8389][Common] Fix oshi compatibility issues cause it fail to boot on m1 mac

zhongjiajie commented on a change in pull request #8390:
URL: https://github.com/apache/dolphinscheduler/pull/8390#discussion_r806493841



##########
File path: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
##########
@@ -134,7 +135,11 @@ public static double loadAverage() {
      */
     public static double cpuUsage() {
         CentralProcessor processor = hal.getProcessor();
-        double cpuUsage = processor.getSystemCpuLoad();
+
+        long[] preTicks = processor.getSystemCpuLoadTicks();
+        Util.sleep(1000);

Review comment:
       Why we should sleep here?




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

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