You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/02 08:55:11 UTC

[GitHub] [skywalking-java] wu-sheng commented on a change in pull request #135: add SAMPLE_AVG_CPU_LOAD_LIMIT config

wu-sheng commented on a change in pull request #135:
URL: https://github.com/apache/skywalking-java/pull/135#discussion_r841046460



##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/JVMService.java
##########
@@ -104,8 +106,16 @@ public void run() {
             jvmBuilder.setClazz(ClassProvider.INSTANCE.getClassMetrics());
 
             sender.offer(jvmBuilder.build());
+
+            // refresh cpu usage percent
+            cpuUsagePercent = jvmBuilder.getCpu().getUsagePercent();

Review comment:
       I think `getUsagePercent` again would cause an issue. Have you tested?




-- 
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: notifications-unsubscribe@skywalking.apache.org

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