On 23/06/2014 13:57, Michael Dürig wrote: > > +1 in general. However, > > - although it results in nice code on the client side, I'm a bit > reluctant about putting all the code into the instance initialiser. it was my concern as well. But don't see that much of a difference from something
timer = new Timer("foobar"); timer.start(); // blabla timer.trackTime(); > - how about reusing org.apache.jackrabbit.oak.stats.Clock instead of > using Guava's Stopwatch? If necessary we could still implement Clock > based on Stopwatch. Didn't know about it. Will have a look and amend accordingly. > - Timer might not be the best name for the class. Should probably > better be something with "Log" in its name It was an example. It could be LogTimer if you prefer or whatever. Don't mind the name and I'm very bad at it :) Davide