You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/18 12:03:14 UTC

[GitHub] [pulsar] liangyepianzhou commented on a change in pull request #11933: Add transaction perf

liangyepianzhou commented on a change in pull request #11933:
URL: https://github.com/apache/pulsar/pull/11933#discussion_r711581327



##########
File path: pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
##########
@@ -406,11 +487,23 @@ public static void main(String[] args) throws Exception {
             long total = totalMessagesReceived.sum();
             double rate = messagesReceived.sumThenReset() / elapsed;
             double throughput = bytesReceived.sumThenReset() / elapsed * 8 / 1024 / 1024;
-
+            double rateAck = messageAck.sumThenReset() / elapsed;
+            long totalTransaction = 0;
+            double averageTimePerTransaction = 0;
+            if (arguments.isEnableTransaction) {
+                totalTransaction = totalNumTransaction.sum();
+                averageTimePerTransaction = elapsed / numTransaction.sumThenReset();
+            }
             reportHistogram = recorder.getIntervalHistogram(reportHistogram);
 
+            String transactionLog = arguments.isEnableTransaction ? "---transaction: " + totalTransaction +
+                    " transaction commit --- " + averageTimePerTransaction + " s/perTxn --- AckRate: " + rateAck
+                    + " msg/s" : "";
+
             log.info(
-                    "Throughput received: {} msg --- {}  msg/s -- {} Mbit/s --- Latency: mean: {} ms - med: {} - 95pct: {} - 99pct: {} - 99.9pct: {} - 99.99pct: {} - Max: {}",

Review comment:
       If transaction disableļ¼Œ the log will not be changed. We really need to create a new log?




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

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