This is an automated email from the ASF dual-hosted git repository.

mattisonchao pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.9 by this push:
     new d0585050964 [improve][java-client] Add pending messages information 
while print the producer stats (#15440)
d0585050964 is described below

commit d0585050964fabc8173d406c6c1d4ca51c4798e2
Author: lipenghui <[email protected]>
AuthorDate: Thu May 5 18:37:38 2022 +0800

    [improve][java-client] Add pending messages information while print the 
producer stats (#15440)
    
    (cherry picked from commit fbe650ce72462e97ca1ba8f9dcb41ab1b7ce47bd)
---
 .../org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java
 
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java
index 6b435d68303..180d53e4949 100644
--- 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java
+++ 
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java
@@ -163,14 +163,15 @@ public class ProducerStatsRecorderImpl implements 
ProducerStatsRecorder {
 
             log.info("[{}] [{}] Pending messages: {} --- Publish throughput: 
{} msg/s --- {} Mbit/s --- "
                             + "Latency: med: {} ms - 95pct: {} ms - 99pct: {} 
ms - 99.9pct: {} ms - max: {} ms --- "
-                            + "Ack received rate: {} ack/s --- Failed 
messages: {}", producer.getTopic(),
-                    producer.getProducerName(), producer.getPendingQueueSize(),
+                            + "Ack received rate: {} ack/s --- Failed 
messages: {} --- Pending messages: {}",
+                    producer.getTopic(), producer.getProducerName(), 
producer.getPendingQueueSize(),
                     THROUGHPUT_FORMAT.format(sendMsgsRate),
                     THROUGHPUT_FORMAT.format(sendBytesRate / 1024 / 1024 * 8),
                     DEC.format(latencyPctValues[0]), 
DEC.format(latencyPctValues[2]),
                     DEC.format(latencyPctValues[3]), 
DEC.format(latencyPctValues[4]),
                     DEC.format(latencyPctValues[5]),
-                    THROUGHPUT_FORMAT.format(currentNumAcksReceived / 
elapsed), currentNumSendFailedMsgs);
+                    THROUGHPUT_FORMAT.format(currentNumAcksReceived / 
elapsed), currentNumSendFailedMsgs,
+                    producer.getPendingQueueSize());
         }
     }
 

Reply via email to