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 2020/02/05 13:12:46 UTC

[GitHub] [skywalking] mrproliu commented on a change in pull request #4322: provide profiled segment list query

mrproliu commented on a change in pull request #4322: provide profiled segment list query
URL: https://github.com/apache/skywalking/pull/4322#discussion_r375245961
 
 

 ##########
 File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/profile/ProfileTaskExecutionContext.java
 ##########
 @@ -150,7 +150,7 @@ public ProfileTask getTask() {
 
     public boolean isStartProfileable() {
         // check is out of max sampling count check
-        return totalStartedProfilingCount.incrementAndGet() > task.getMaxSamplingCount();
+        return totalStartedProfilingCount.incrementAndGet() <= task.getMaxSamplingCount();
 
 Review comment:
   If `maxSamplingCount` is `2`, and `totalStartedProfilingCount` start with `0`. 
   Use `<` to decide `isStartProfileable`, the second time to `incrementAndGet` will return `false`. That's not right. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services