|
With regard to the "overall operation time" metric, the idea was to be able to see the time calls were actually "inside" Hibernate (as opposed to time in the app in between calls to Hibernate). To me that without this metric, the other time metrics are fairly irrelevent.
However, given the highly re-entrant nature of Hibernate I am a little concered about the best way to achieve this. Mainly this is a concern when "marking the end of the operation". So for example, when a call to load triggers a nested call to load making sure that the return from that nested load call does not "stop the timer".
One option (that I very much dislike) is depth counting. Another option would be a "gate keeper" approach where each operation call sets up a delegate where nested calls get a noop version. Neither are ideal. Any other options to suggest?
I guess another option would be to not track "overall operation time", but like I said the other time metrics are fairly useless (IMO) without this number.
|