lhotari commented on a change in pull request #10765:
URL: https://github.com/apache/pulsar/pull/10765#discussion_r644495217



##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
##########
@@ -401,13 +403,15 @@ public static void main(String[] args) throws Exception {
 
             long now = System.nanoTime();
             double elapsed = (now - oldTime) / 1e9;
-            double rate = messagesReceived.sumThenReset() / elapsed;
+            long total = messagesReceived.sumThenReset();

Review comment:
       is `total` all messages that have been consumed? just wondering if 
`.sumThenReset` will actually do what it would expected to do, reset to 0 after 
returning the value?

##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
##########
@@ -401,13 +403,15 @@ public static void main(String[] args) throws Exception {
 
             long now = System.nanoTime();
             double elapsed = (now - oldTime) / 1e9;
-            double rate = messagesReceived.sumThenReset() / elapsed;
+            long total = messagesReceived.sumThenReset();

Review comment:
       Thanks for the clarification.




-- 
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:
[email protected]


Reply via email to