Class P6SpyStatsCollector

java.lang.Object
com.p6spy.engine.event.JdbcEventListener
net.brdloush.dbstopwatch.P6SpyStatsCollector

public class P6SpyStatsCollector extends com.p6spy.engine.event.JdbcEventListener
P6Spy event listener that captures real JDBC execution times including result set processing time.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static void
     
    void
    onAfterExecute(com.p6spy.engine.common.PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
     
    void
    onAfterExecute(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
     
    void
    onAfterExecuteBatch(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, int[] updateCounts, SQLException e)
     
    void
    onAfterExecuteQuery(com.p6spy.engine.common.PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
     
    void
    onAfterExecuteQuery(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
     
    void
    onAfterExecuteUpdate(com.p6spy.engine.common.PreparedStatementInformation statementInformation, long timeElapsedNanos, int rowCount, SQLException e)
     
    void
    onAfterExecuteUpdate(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, String sql, int rowCount, SQLException e)
     
    static void
     

    Methods inherited from class com.p6spy.engine.event.JdbcEventListener

    onAfterAddBatch, onAfterAddBatch, onAfterCallableStatementSet, onAfterCommit, onAfterConnectionClose, onAfterGetConnection, onAfterGetResultSet, onAfterPreparedStatementSet, onAfterResultSetClose, onAfterResultSetGet, onAfterResultSetGet, onAfterResultSetNext, onAfterRollback, onAfterSetAutoCommit, onAfterStatementClose, onBeforeAddBatch, onBeforeAddBatch, onBeforeCommit, onBeforeExecute, onBeforeExecute, onBeforeExecuteBatch, onBeforeExecuteQuery, onBeforeExecuteQuery, onBeforeExecuteUpdate, onBeforeExecuteUpdate, onBeforeGetConnection, onBeforeResultSetNext, onBeforeRollback, onBeforeSetAutoCommit, onConnectionWrapped

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • P6SpyStatsCollector

      public P6SpyStatsCollector()
  • Method Details

    • markBlockStart

      public static void markBlockStart()
    • getBlockStats

      public static P6SpyStatsCollector.BlockStats getBlockStats()
    • reset

      public static void reset()
    • onAfterExecuteQuery

      public void onAfterExecuteQuery(com.p6spy.engine.common.PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
      Overrides:
      onAfterExecuteQuery in class com.p6spy.engine.event.JdbcEventListener
    • onAfterExecuteQuery

      public void onAfterExecuteQuery(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
      Overrides:
      onAfterExecuteQuery in class com.p6spy.engine.event.JdbcEventListener
    • onAfterExecuteUpdate

      public void onAfterExecuteUpdate(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, String sql, int rowCount, SQLException e)
      Overrides:
      onAfterExecuteUpdate in class com.p6spy.engine.event.JdbcEventListener
    • onAfterExecuteUpdate

      public void onAfterExecuteUpdate(com.p6spy.engine.common.PreparedStatementInformation statementInformation, long timeElapsedNanos, int rowCount, SQLException e)
      Overrides:
      onAfterExecuteUpdate in class com.p6spy.engine.event.JdbcEventListener
    • onAfterExecute

      public void onAfterExecute(com.p6spy.engine.common.PreparedStatementInformation statementInformation, long timeElapsedNanos, SQLException e)
      Overrides:
      onAfterExecute in class com.p6spy.engine.event.JdbcEventListener
    • onAfterExecute

      public void onAfterExecute(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, String sql, SQLException e)
      Overrides:
      onAfterExecute in class com.p6spy.engine.event.JdbcEventListener
    • onAfterExecuteBatch

      public void onAfterExecuteBatch(com.p6spy.engine.common.StatementInformation statementInformation, long timeElapsedNanos, int[] updateCounts, SQLException e)
      Overrides:
      onAfterExecuteBatch in class com.p6spy.engine.event.JdbcEventListener