You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/05/05 10:37:46 UTC
[pulsar] branch master updated: [improve][java-client] Add pending messages information while print the producer stats (#15440)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new fbe650ce724 [improve][java-client] Add pending messages information while print the producer stats (#15440)
fbe650ce724 is described below
commit fbe650ce72462e97ca1ba8f9dcb41ab1b7ce47bd
Author: lipenghui <pe...@apache.org>
AuthorDate: Thu May 5 18:37:38 2022 +0800
[improve][java-client] Add pending messages information while print the producer stats (#15440)
---
.../org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java | 6 ++++--
1 file changed, 4 insertions(+), 2 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 29b8cf28c31..1f1b5b2efe7 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
@@ -182,7 +182,8 @@ public class ProducerStatsRecorderImpl implements ProducerStatsRecorder {
+ "BatchSize: med: {} - 95pct: {} - 99pct: {} - 99.9pct: {} - max: {} --- "
+ "MsgSize: med: {} bytes - 95pct: {} bytes - 99pct: {} bytes - 99.9pct: {} bytes "
+ "- max: {} bytes --- "
- + "Ack received rate: {} ack/s --- Failed messages: {}", producer.getTopic(),
+ + "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),
@@ -195,7 +196,8 @@ public class ProducerStatsRecorderImpl implements ProducerStatsRecorder {
DEC.format(msgSizePctValues[0]), DEC.format(msgSizePctValues[2]),
DEC.format(msgSizePctValues[3]), DEC.format(msgSizePctValues[4]),
DEC.format(msgSizePctValues[5]),
- THROUGHPUT_FORMAT.format(currentNumAcksReceived / elapsed), currentNumSendFailedMsgs);
+ THROUGHPUT_FORMAT.format(currentNumAcksReceived / elapsed), currentNumSendFailedMsgs,
+ getPendingQueueSize());
}
}