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

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

commit 304924cd837a92fb2ac1e02b92a4107d554bb49b
Author: Lagranmoon <[email protected]>
AuthorDate: Mon Jul 27 20:26:52 2020 +0800

    fix:apache#7669 stats recorder time unit error (#7670)
    
    
    (cherry picked from commit 19d17de2ef1bdeb60ead077b6670da7b9f97d7ad)
---
 .../org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 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 16d0dc9..923b663 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
@@ -59,7 +59,7 @@ public class ProducerStatsRecorderImpl implements 
ProducerStatsRecorder {
 
     private volatile double sendMsgsRate;
     private volatile double sendBytesRate;
-    private volatile double[] latencyPctValues;
+    private volatile double[] latencyPctValues = new 
double[PERCENTILES.length];
 
     private static final double[] PERCENTILES = { 0.5, 0.75, 0.95, 0.99, 
0.999, 1.0 };
 
@@ -148,9 +148,9 @@ public class ProducerStatsRecorderImpl implements 
ProducerStatsRecorder {
                             producer.getProducerName(), 
producer.getPendingQueueSize(),
                             THROUGHPUT_FORMAT.format(sendMsgsRate),
                             THROUGHPUT_FORMAT.format(sendBytesRate / 1024 / 
1024 * 8),
-                            DEC.format(latencyPctValues[0] / 1000.0), 
DEC.format(latencyPctValues[2] / 1000.0),
-                            DEC.format(latencyPctValues[3] / 1000.0), 
DEC.format(latencyPctValues[4] / 1000.0),
-                            DEC.format(latencyPctValues[5] / 1000.0),
+                            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);
                 }
 

Reply via email to