Hi BookKeepers, I've changed the API for org.apache.bookkeeper.stats.Counter: BP-58 <https://github.com/apache/bookkeeper/issues/3502>
"Motivation" The latency of the OpStatsLogger.registerSuccessfulEvent calculation is to convert the time to milliseconds but Counter.add nothing to do so when using Counter for latency statistics, the time unit and OpStatsLogger are not unified, which is easy to be misleading. then we unified latency metric unit "Proposal" We already have the Counter metric for counting , we just need to refactor it and expose it as a public method. My idea is to change the API of org.apache.bookkeeper.stats.Counter when using Counter for count metric, use Counter.addCount,intead of old API(Counter.add) when using Counter for latency metric, use Counter.addLatency "Release" because it change the API,so we don't cherry pick this into released branches so it should go into a major release, like Release-4.16, then we can update its implementation in other projects, like pulsar What do you think about it?