rdhabalia opened a new pull request #14330:
URL: https://github.com/apache/pulsar/pull/14330


   ### Motivation
   
   Right now, consumer-metrics always shows `"avgMessagesPerEntry" : 6` in 
`topics stats` metrics even though entry has only 1 message in it. It's because 
of avg-message size formula uses `Math.round` which always converts `5.5 => 6` 
and it never decreases avg messages per entry.
   ```
    "consumers" : [ {
           "msgRateOut" : 852.8218898769269,
           :
           "avgMessagesPerEntry" : 6,
   ```
   
   After the fix it shows below correct result
   ```
   "consumers" : [ {
           "msgRateOut" : 943.489431427803,
           :
           "avgMessagesPerEntry" : 1,
   ```


-- 
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