It's very difficult to profile a ModeShape engine; statistics on method invocations and objects don't add a lot of value, given our command framework.
We should add a way for client applications to enable "profiling" so that they can understand what activities are being done on each session and how those activities translate to requests against the connectors. This will not only help us understand what's going on (e.g., are there unnecessary/excess requests being made?) and help identify the causes of unexpected behaviors (e..g, is a session being used by multiple threads).
This profiling mechanism needs to be as lightweight as possible when enabled so as to not have a marked influence on performance (and thus any multi-threaded timing peculiarities).