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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]