You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/02/22 15:11:37 UTC

[GitHub] [rocketmq] HScarb commented on a change in pull request #3862: [ISSUE #3859] enhance the cal of latency for putting message

HScarb commented on a change in pull request #3862:
URL: https://github.com/apache/rocketmq/pull/3862#discussion_r812049739



##########
File path: store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java
##########
@@ -39,6 +43,12 @@
         "[<=0ms]", "[0~10ms]", "[10~50ms]", "[50~100ms]", "[100~200ms]", "[200~500ms]", "[500ms~1s]", "[1~2s]", "[2~3s]", "[3~4s]", "[4~5s]", "[5~10s]", "[10s~]",
     };
 
+    //The rule to define buckets
+    private static final Map<Integer, Integer> PUT_MESSAGE_ENTIRE_TIME_BUCKETS = new TreeMap<>();
+    //buckets
+    private TreeMap<Long/*bucket*/, AtomicLong/*times*/> buckets = new TreeMap<>();

Review comment:
       Consider using LongAdder to improve the performance




-- 
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: dev-unsubscribe@rocketmq.apache.org

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