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



##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
##########
@@ -424,15 +517,38 @@ public static void main(String[] args) throws Exception {
         pulsarClient.close();
     }
 
-    private static void printAggregatedThroughput(long start) {
+    private static void printAggregatedThroughput(long start, Arguments 
arguments) {
         double elapsed = (System.nanoTime() - start) / 1e9;
         double rate = totalMessagesReceived.sum() / elapsed;
         double throughput = totalBytesReceived.sum() / elapsed * 8 / 1024 / 
1024;
+        long totalTransaction = 0;
+        long totalTransactionFailed = 0;
+        long totalnumMessageAckFailed = 0;
+        double rateAck = totalMessageAck.sum() / elapsed;
+        double averageTimePerTransaction = 0;
+        if (arguments.isEnableTransaction) {
+            totalTransaction = totalNumTransaction.sum();
+            averageTimePerTransaction = elapsed / totalNumTransaction.sum();
+            totalTransactionFailed = totalNumTransactionFailed.sum();
+            totalnumMessageAckFailed = totalMessageAckFailed.sum();
+        }
+
+            String commitOrAbortTransaction = arguments.isEnableTransaction
+                    ? " transaction commit --- " + totalTransactionFailed + 
"transaction commit Failed --- "

Review comment:
        Here should  be IsCommitTransaction.   Sorry, I didn't check it out. 
The log will be different when transaction commit or abort. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to