Add updateRates method for kop to collect publish rate
Fixes
### Motivation
kop & pulsar use the same metrics collector, but kop can't collect publish rate now.
### Modifications
add `updateRates` method for kop to collect publish rate
@@ -586,7 +586,10 @@ public class Producer {
msgDrop.calculateRate();
((NonPersistentPublisherStats) stats).msgDropRate = msgDrop.getRate();
}
+ }
+ public void updateRates(int numOfMessages, long msgSizeInBytes) {
+ msgIn.recordMultipleEvents(numOfMessages, msgSizeInBytes);
}
public boolean isRemote() {
