You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/09/27 01:36:22 UTC

[GitHub] [bookkeeper] Shoothzj commented on a diff in pull request #3501: unified latency metric unit

Shoothzj commented on code in PR #3501:
URL: https://github.com/apache/bookkeeper/pull/3501#discussion_r980646607


##########
bookkeeper-common/src/test/java/org/apache/bookkeeper/test/TestStatsProvider.java:
##########
@@ -60,10 +60,16 @@ public void dec() {
         }
 
         @Override
-        public void add(long delta) {
+        public void addCount(long delta) {
             updateMax(val.addAndGet(delta));
         }
 
+        @Override
+        public void addLatency(long eventLatency, TimeUnit unit) {
+            long valueMillis = unit.toMicros(eventLatency) / 1000;

Review Comment:
   I think we can both use unit.toMills



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

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