Examples of CodeTimerSegment


Examples of com.icentris.util.CodeTimerSegment

  public static java.sql.Connection getConnection(String poolName)
    throws SQLException
  {
    CodeTimer timer = new CodeTimer();
    CodeTimerSegment segment = timer.start("ConnectionPool: getConnection");
    segment.setCanBeSubSegmentOnlyIfUnacceptable( true );
    ConnectionPool pool = (ConnectionPool) poolsByDb.get(poolName);
    if ( pool == null ) {
      throw new IllegalStateException("The ConnectionPool (" + poolName + ") has not been initialized yet");
    }
    //sendNotification( new Notification(NOTIF_OPENCONNECTION, NOTIF_OPENCONNECTION,
View Full Code Here

Examples of com.icentris.util.CodeTimerSegment

  void startTimer() {
    if ( useCodeTimer == true ) {
      // get the unique string from my caller, then save it for the stop call
      // (since it may be in a different method)
      CodeTimerSegment tmpSegment = timer.start( callerDepth + 1 );
      String uniqueString = tmpSegment.getUniqueString();
      tmpSegment.setCanBeSubSegment( false );
      tmpSegment.setSaveAggregateData( false );
      timer.stop( callerDepth + 1 );

      // now start the real timing
      segment = timer.start( "SQL:" + uniqueString );
    }
View Full Code Here

Examples of com.icentris.util.CodeTimerSegment

        timer = new CodeTimer();
        timer.setCallersToIgnore( callersToIgnore );
        Properties props = new Properties();
        props.setProperty("sqlQuery", sql);
        segment.setProperties( props );
        CodeTimerSegment subSegment = timer.start(callerDepth);
        subSegment.setLabel("SQL:executeQuery");
        subSegment.setSaveAggregateData( false );
        ResultSetWrapper results = new ResultSetWrapper( realStatement.executeQuery(sql), this );
        results.setCallersToIgnore( callersToIgnore );
        results.setUniqueString( "SQL:ResultSet.next() + getString():" + segment.getUniqueString().substring(4) );
        results.setUseCodeTimer( useCodeTimer );
        return results;
View Full Code Here

Examples of com.icentris.util.CodeTimerSegment

        } else {
          props.setProperty("originalSql", originalSql);
          props.setProperty("params", params.toString());
        }
        segment.setProperties( props );
        CodeTimerSegment subSegment = timer.start( getCallerDepth() );
        subSegment.setLabel("SQL:executeQuery()");
        subSegment.setSaveAggregateData( false );
        ResultSetWrapper results = new ResultSetWrapper( realStatement.executeQuery(), this );
        results.setUniqueString( "SQL:ResultSet.next() + getString():" + segment.getUniqueString().substring(4) );
        results.setUseCodeTimer( useCodeTimer() );
        return results;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.