#1183 - ENH: Add support for transaction profiling

This commit is contained in:
rob bygrave
2017-10-25 01:07:00 +13:00
parent 093f82a87f
commit 7ebef51859
46 changed files with 1063 additions and 68 deletions
@@ -9,6 +9,7 @@ import io.ebeaninternal.server.core.PersistDeferredRelationship;
import io.ebeaninternal.server.core.PersistRequest;
import io.ebeaninternal.server.core.PersistRequestBean;
import io.ebeaninternal.server.persist.BatchControl;
import io.ebeaninternal.server.transaction.ProfileStream;
import io.ebeanservice.docstore.api.DocStoreTransaction;
import javax.persistence.PersistenceException;
@@ -282,4 +283,19 @@ public interface SpiTransaction extends Transaction {
* Return the current Tenant Id.
*/
Object getTenantId();
/**
* Return the offset time from the start of the transaction.
*/
int profileOffset();
/**
* Check if the event should be added to a profiling transaction.
*/
void profileEvent(SpiProfileTransactionEvent event);
/**
* Return the stream that profiling events are written to.
*/
ProfileStream profileStream();
}