Is your enhancement request related to a problem? Please describe.
The default producer stats update period is 60 seconds
|
/** |
|
* Stats will be activated with positive statsIntervalSeconds |
|
* |
|
* @return the interval between each stat info <i>(default: 60 seconds)</i> |
|
*/ |
|
public long getStatsIntervalSeconds() { |
|
return confData.getStatsIntervalSeconds(); |
|
} |
if you have a short-lived producer (lasts less than 60 seconds) then the quantile latencies will not get updated and you will see 0 values for the latencies
|
synchronized (ds) { |
|
latencyPctValues = ds.getQuantiles(PERCENTILES); |
|
ds.reset(); |
|
} |
Describe the solution you'd like
It would be nice on Producer flush() or close() to capture the complete final state of the statistics (including the latencies)
Say perhaps on close() here
https://github.com/apache/pulsar/blob/v2.7.2/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java#L842
Describe alternatives you've considered
Not aware of alternatives but perhaps others are
Is your enhancement request related to a problem? Please describe.
The default producer stats update period is 60 seconds
pulsar/pulsar-client-1x-base/pulsar-client-1x/src/main/java/org/apache/pulsar/client/api/ClientConfiguration.java
Lines 281 to 288 in 7bf14b5
if you have a short-lived producer (lasts less than 60 seconds) then the quantile latencies will not get updated and you will see
0values for the latenciespulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java
Lines 128 to 131 in 1eb08f3
Describe the solution you'd like
It would be nice on Producer
flush()orclose()to capture the complete final state of the statistics (including the latencies)Say perhaps on
close()herehttps://github.com/apache/pulsar/blob/v2.7.2/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java#L842
Describe alternatives you've considered
Not aware of alternatives but perhaps others are