| I am going to question these transaction related ones. Those especially are tied to use case. E.g. the statement, batching and transactional expectations around a use-case to update a sales/lead territory map is going to be very different from the statement, batching and transactional expectations around a login screen. And lumping those together simply muddy the waters IMO. FWIW we do capture these at the Session level. On thing I had considered was a way to publish these Session-stats to the shared Statistics collector via a name. E.g. allow a user to ask that the Session-stats for a specific Session be published to the Statistics collector by some name:
Session session = ...;
session.publishStatsUnder( "territoryMapUpdate" );
the #publishStatsUnder call (just accept the same for now) does not actually publish synchronously. Instead it is an asynchronous mandate to publish this Session's stats under the free-form name. This would correlate a call like:
SessionStats stats = factory.getStatistics().getSessionStats( "territoryMapUpdate" );
I can see the name SessionStats or NamedUseCaseStats here. For refresher, here are the Session event/stats we collect currently:
public interface SessionEventListener extends Serializable {
public void transactionCompletion(boolean successful);
public void jdbcConnectionAcquisitionStart();
public void jdbcConnectionAcquisitionEnd();
public void jdbcConnectionReleaseStart();
public void jdbcConnectionReleaseEnd();
public void jdbcPrepareStatementStart();
public void jdbcPrepareStatementEnd();
public void jdbcExecuteStatementStart();
public void jdbcExecuteStatementEnd();
public void jdbcExecuteBatchStart();
public void jdbcExecuteBatchEnd();
public void cachePutStart();
public void cachePutEnd();
public void cacheGetStart();
public void cacheGetEnd(boolean hit);
public void flushStart();
public void flushEnd(int numberOfEntities, int numberOfCollections);
public void partialFlushStart();
public void partialFlushEnd(int numberOfEntities, int numberOfCollections);
public void dirtyCalculationStart();
public void dirtyCalculationEnd(boolean dirty);
public void end();
}
|