+1 (non-binding) Thanks ZhangJian He
On Sun, 25 Sept 2022 at 20:45, Enrico Olivelli <eolive...@gmail.com> wrote: > I agree > > Enrico > > Il Dom 25 Set 2022, 03:09 steven lu <lushiji2...@gmail.com> ha scritto: > > > 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? > > >