public void logResults(){
  if (!OracleLog.isLoggingEnabled() || (currentLogLevel > FINE_LOG_LEVEL))   return;
  boolean chatty_logging=(currentLogLevel < FINE_LOG_LEVEL);
  StringBuilder sb=new StringBuilder();
  sb.append("\n\n");
  if (chatty_logging || (dbConnectNanos > 0L))   logMsgTime(sb,"JDBC connect in: ",dbConnectNanos);
  if (chatty_logging || (dbTransactionNanos > 0L))   logMsgTime(sb,"JDBC commit/rollback in: ",dbTransactionNanos);
  if (chatty_logging || (ioReadBytes > 0) || (ioReadNanos > 0L))   logMsgCountTime(sb,"IO read: ",ioReadBytes,ioReadNanos);
  if (chatty_logging || (ioWrites > 0)) {
    sb.append("IO writes: ");
    sb.append(Integer.toString(ioWrites));
    sb.append(" of ");
    sb.append(Integer.toString(ioWriteBytes));
    sb.append(" bytes in ");
    sb.append(nanosToString(ioWriteNanos));
    sb.append("\n");
  }
  if ((chatty_logging) || (checksums > 0))   logMsgCountTime(sb,"Checksums: ",checksums,checksumNanos);
  if (chatty_logging || (dbDDLs > 0))   logMsgCountTime(sb,"DDLS: ",dbDDLs,dbDDLNanos);
  if (chatty_logging || (dbGUIDs > 0))   logMsgCountTime(sb,"GUID fetches: ",dbGUIDs,dbGUIDNanos);
  if (chatty_logging || (dbTimestampReads > 0))   logMsgCountTime(sb,"SYSTIMESTAMP reads: ",dbTimestampReads,dbTimestampNanons);
  if (chatty_logging || (dbSequenceBatch > 0))   logMsgCountTime(sb,"Sequence batch fetches: ",dbSequenceBatch,dbSequenceBatchNanos);
  if (chatty_logging || (dbCursorReads > 0)) {
    logMsgCount(sb,"Cursor reads: ",dbCursorReads);
  }
  if (chatty_logging || (dbLobReads > 0) || (dbLobWrites > 0)) {
    logMsgCountTime(sb,"LOB reads: ",dbLobReads,dbLobReadNanos);
    logMsgCountTime(sb,"LOB writes: ",dbLobWrites,dbLobWriteNanos);
  }
  if (chatty_logging || (dbProcCalls > 0))   logMsgCountTime(sb,"PLSQL calls: ",dbProcCalls,dbProcCallNanos);
  if ((chatty_logging) || (dbDocReadRoundTrips > 0) || (dbDocWriteRoundTrips > 0)) {
    logMsgCountTime(sb,"Doc read round-trips: ",dbDocReadRoundTrips,dbDocReadNanos);
    logMsgCountTime(sb,"Doc write round-trips: ",dbDocWriteRoundTrips,dbDocWriteNanos);
  }
  if (encounteredNegativeTimeDiff) {
    sb.append("Warning: timings might be off, encountered negative time diff!!!\n");
  }
  long elapsed=getTime() - total_time;
  logMsgTime(sb,"\nElapsed total: ",elapsed);
  log.fine(sb.toString());
}

public void logResults ( ) { if ( ! OracleLog . isLoggingEnabled ( ) || ( currentLogLevel > FINE_LOG_LEVEL ) ) return ; boolean chatty_logging = ( currentLogLevel < FINE_LOG_LEVEL ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "\n\n" ) ; if ( chatty_logging || ( dbConnectNanos > 0L ) ) logMsgTime ( sb , "JDBC connect in: " , dbConnectNanos ) ; if ( chatty_logging || ( dbTransactionNanos > 0L ) ) logMsgTime ( sb , "JDBC commit/rollback in: " , dbTransactionNanos ) ; if ( chatty_logging || ( ioReadBytes > 0 ) || ( ioReadNanos > 0L ) ) logMsgCountTime ( sb , "IO read: " , ioReadBytes , ioReadNanos ) ; if ( chatty_logging || ( ioWrites > 0 ) ) { sb . append ( "IO writes: " ) ; sb . append ( Integer . toString ( ioWrites ) ) ; sb . append ( " of " ) ; sb . append ( Integer . toString ( ioWriteBytes ) ) ; sb . append ( " bytes in " ) ; sb . append ( nanosToString ( ioWriteNanos ) ) ; sb . append ( "\n" ) ; } if ( ( chatty_logging ) || ( checksums > 0 ) ) logMsgCountTime ( sb , "Checksums: " , checksums , checksumNanos ) ; if ( chatty_logging || ( dbDDLs > 0 ) ) logMsgCountTime ( sb , "DDLS: " , dbDDLs , dbDDLNanos ) ; if ( chatty_logging || ( dbGUIDs > 0 ) ) logMsgCountTime ( sb , "GUID fetches: " , dbGUIDs , dbGUIDNanos ) ; if ( chatty_logging || ( dbTimestampReads > 0 ) ) logMsgCountTime ( sb , "SYSTIMESTAMP reads: " , dbTimestampReads , dbTimestampNanons ) ; if ( chatty_logging || ( dbSequenceBatch > 0 ) ) logMsgCountTime ( sb , "Sequence batch fetches: " , dbSequenceBatch , dbSequenceBatchNanos ) ; if ( chatty_logging || ( dbCursorReads > 0 ) ) { logMsgCount ( sb , "Cursor reads: " , dbCursorReads ) ; } if ( chatty_logging || ( dbLobReads > 0 ) || ( dbLobWrites > 0 ) ) { logMsgCountTime ( sb , "LOB reads: " , dbLobReads , dbLobReadNanos ) ; logMsgCountTime ( sb , "LOB writes: " , dbLobWrites , dbLobWriteNanos ) ; } if ( chatty_logging || ( dbProcCalls > 0 ) ) logMsgCountTime ( sb , "PLSQL calls: " , dbProcCalls , dbProcCallNanos ) ; if ( ( chatty_logging ) || ( dbDocReadRoundTrips > 0 ) || ( dbDocWriteRoundTrips > 0 ) ) { logMsgCountTime ( sb , "Doc read round-trips: " , dbDocReadRoundTrips , dbDocReadNanos ) ; logMsgCountTime ( sb , "Doc write round-trips: " , dbDocWriteRoundTrips , dbDocWriteNanos ) ; } if ( encounteredNegativeTimeDiff ) { sb . append ( "Warning: timings might be off, encountered negative time diff!!!\n" ) ; } long elapsed = getTime ( ) - total_time ; logMsgTime ( sb , "\nElapsed total: " , elapsed ) ; log . fine ( sb . toString ( ) ) ; }
print the metrics to the log file
