db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r563985 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/execute/ impl/sql/execute/
Date Wed, 08 Aug 2007 19:00:47 GMT
Author: djd
Date: Wed Aug  8 12:00:40 2007
New Revision: 563985

URL: http://svn.apache.org/viewvc?view=rev&rev=563985
Log:
Cleanup the setting of constructorTime in BasicNoPutResultSetImpl
implementations to have a single method to set it.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java
Wed Aug  8 12:00:40 2007
@@ -61,6 +61,11 @@
 	 * openCore() can only be called on a closed result
 	 * set.  see reopenCore if you want to reuse an open
 	 * result set.
+	 * <p>
+	 * For NoPutResultSet open() must only be called on
+	 * the top ResultSet. Opening of NoPutResultSet's
+	 * below the top result set are implemented by calling
+	 * openCore.
 	 *
 	 * @exception StandardException thrown if cursor finished.
 	 */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java Wed
Aug  8 12:00:40 2007
@@ -77,7 +77,7 @@
 		this.emptyRowFun = emptyRowFun;
 		this.subqueryNumber = subqueryNumber;
 		this.pointOfAttachment = pointOfAttachment;
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
Wed Aug  8 12:00:40 2007
@@ -21,38 +21,28 @@
 
 package org.apache.derby.impl.sql.execute;
 
-import org.apache.derby.iapi.services.context.ContextService;
+import java.sql.SQLWarning;
+import java.sql.Timestamp;
+
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.services.i18n.MessageService;
+import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
-import org.apache.derby.iapi.services.stream.InfoStreams;
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.services.i18n.MessageService;
-
-import org.apache.derby.iapi.store.access.TransactionController;
-
-import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-import org.apache.derby.iapi.sql.conn.StatementContext;
-
-import org.apache.derby.iapi.reference.SQLState;
-
-import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.sql.execute.NoPutResultSet;
-import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.sql.Activation;
-
-
 import org.apache.derby.iapi.sql.ResultDescription;
 import org.apache.derby.iapi.sql.ResultSet;
 import org.apache.derby.iapi.sql.Row;
-
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
+import org.apache.derby.iapi.sql.conn.StatementContext;
+import org.apache.derby.iapi.sql.execute.ExecRow;
+import org.apache.derby.iapi.sql.execute.ExecutionFactory;
+import org.apache.derby.iapi.sql.execute.NoPutResultSet;
+import org.apache.derby.iapi.store.access.TransactionController;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
-import org.apache.derby.iapi.services.io.FormatableBitSet;
-
-import java.sql.Timestamp;
-import java.sql.SQLWarning;
-
 /**
  * Abstract ResultSet for for operations that return rows but
  * do not allow the caller to put data on output pipes. This
@@ -98,7 +88,7 @@
 
 	// Set in the constructor and not modified
 	protected final Activation	    activation;
-	private boolean				statisticsTimingOn;
+	private final boolean				statisticsTimingOn;
 
 	ResultDescription resultDescription;
 
@@ -125,25 +115,30 @@
 							double optimizerEstimatedCost)
 	{
 		this.activation = activation;
-		statisticsTimingOn = getLanguageConnectionContext().getStatisticsTiming();
-		beginTime = startExecutionTime = getCurrentTimeMillis();
+		if (statisticsTimingOn = getLanguageConnectionContext().getStatisticsTiming())
+		    beginTime = startExecutionTime = getCurrentTimeMillis();
 		this.resultDescription = resultDescription;
 		this.optimizerEstimatedRowCount = optimizerEstimatedRowCount;
 		this.optimizerEstimatedCost = optimizerEstimatedCost;
 	}
 	
+	/**
+	 * Allow sub-classes to record the total
+	 * time spent in their constructor time.
+	 *
+	 */
+	protected final void recordConstructorTime()
+	{
+		if (statisticsTimingOn)
+		    constructorTime = getElapsedMillis(beginTime);
+	}
+	
 	public final Activation getActivation()
 	{
 		return activation;
 	}
 
 	// NoPutResultSet interface
-
-	/**
-	 * @see NoPutResultSet#openCore
-	 * @exception StandardException thrown if cursor finished.
-     */
-	public abstract void openCore() throws StandardException;
 
 	/**
 	 * This is the default implementation of reopenCore().

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
Wed Aug  8 12:00:40 2007
@@ -217,7 +217,7 @@
 										 getSavedObject(rltItem));
 		numFkColumns = fkColArray.length;
 		indexQualifierRow = new IndexRow(numFkColumns);
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
 	}
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
Wed Aug  8 12:00:40 2007
@@ -108,7 +108,7 @@
 
 		this.maxRowSize = maxRowSize;
 
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
Wed Aug  8 12:00:40 2007
@@ -128,7 +128,7 @@
 					a.getPreparedStatement().getSavedObject(aggregateItem));
 		}
 
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
Wed Aug  8 12:00:40 2007
@@ -205,7 +205,7 @@
 
 		compactRow =
 				getCompactRow(candidate, accessedCols, (FormatableBitSet) null, false);
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
Wed Aug  8 12:00:40 2007
@@ -152,10 +152,11 @@
 		{
 			mappedResultRow = activation.getExecutionFactory().getValueRow(projectMapping.length);
 		}
-		constructorTime += getElapsedMillis(beginTime);
 
 		/* Remember whether or not RunTimeStatistics is on */
 		runTimeStatsOn = getLanguageConnectionContext().getRunTimeStatisticsMode();
+		
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
Wed Aug  8 12:00:40 2007
@@ -194,7 +194,7 @@
 				}
 			}
 		}
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
 	}
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java Wed
Aug  8 12:00:40 2007
@@ -93,8 +93,10 @@
         this.restriction = restriction;
 		this.oneRowRightSide = oneRowRightSide;
 		this.notExistsRightSide = notExistsRightSide;
-		constructorTime += getElapsedMillis(beginTime);
+
 		this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides;
+		
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
Wed Aug  8 12:00:40 2007
@@ -133,8 +133,6 @@
 
 		runTimeStatisticsOn = getLanguageConnectionContext().getRunTimeStatisticsMode();
 
-		constructorTime += getElapsedMillis(beginTime);
-
 		/*
 		** If scan tracing is turned on, print information about this
 		** LastIndexKeyResultSet when it is first opened.  
@@ -148,6 +146,8 @@
 		}
 
 		activation.informOfRowCount(this, 1);
+		
+		recordConstructorTime();
     }
 
 	/////////////////////////////////////////////////////

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
Wed Aug  8 12:00:40 2007
@@ -85,7 +85,7 @@
         // Get the current transaction controller
         tc = activation.getTransactionController();
 
-		constructorTime += getElapsedMillis(beginTime);
+        recordConstructorTime();
 	}
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
Wed Aug  8 12:00:40 2007
@@ -115,7 +115,7 @@
 	*/
 		startCol = (forUpdate) ? ((numCols - 1)/ 2) + 1 : 1;
 		normalizedRow = activation.getExecutionFactory().getValueRow(numCols);
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
 	}
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java Wed
Aug  8 12:00:40 2007
@@ -87,7 +87,7 @@
 		this.cardinalityCheck = cardinalityCheck;
 		this.subqueryNumber = subqueryNumber;
 		this.pointOfAttachment = pointOfAttachment;
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
Wed Aug  8 12:00:40 2007
@@ -116,7 +116,7 @@
 
 		/* Remember whether or not RunTimeStatistics is on */
 		runTimeStatsOn = getLanguageConnectionContext().getRunTimeStatisticsMode();
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java Wed
Aug  8 12:00:40 2007
@@ -80,7 +80,7 @@
 
         this.row = row;
 		this.canCacheRow = canCacheRow;
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	/* This constructor takes in a constant row value, as the cache row.  See the
@@ -102,7 +102,7 @@
 		beginTime = getCurrentTimeMillis();
         this.cachedRow = constantRow;
 		this.canCacheRow = canCacheRow;
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
Wed Aug  8 12:00:40 2007
@@ -123,7 +123,7 @@
 			SanityManager.DEBUG("AggregateTrace","execution time: "+ 
 					a.getPreparedStatement().getSavedObject(aggregateItem));
 		}
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
Wed Aug  8 12:00:40 2007
@@ -173,8 +173,6 @@
 				"maxRows not expected to be -1");
 		}
 
-		constructorTime += getElapsedMillis(beginTime);
-
 		positionInHashTable = new SQLInteger();
 		needsRepositioning = false;
 		if (isForUpdate()) {
@@ -184,6 +182,8 @@
 			target = null;
 			extraColumns = 1;
 		}
+		
+		recordConstructorTime();
 	}
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
Wed Aug  8 12:00:40 2007
@@ -92,7 +92,7 @@
         ExecPreparedStatement eps = activation.getPreparedStatement();
         intermediateOrderByColumns = (int[]) eps.getSavedObject(intermediateOrderByColumnsSavedObject);
         intermediateOrderByDirection = (int[]) eps.getSavedObject(intermediateOrderByDirectionSavedObject);
-		constructorTime += getElapsedMillis(beginTime);
+        recordConstructorTime();
     }
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java Wed
Aug  8 12:00:40 2007
@@ -209,7 +209,7 @@
 		*/
 		observer = new BasicSortObserver(true, distinct, sortTemplateRow, true);
 
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
Wed Aug  8 12:00:40 2007
@@ -219,13 +219,13 @@
 
 		runTimeStatisticsOn = (activation != null &&
 							   activation.getLanguageConnectionContext().getRunTimeStatisticsMode());
-
-		constructorTime += getElapsedMillis(beginTime);
 		
 		/* Always qualify the first time a row is being read */
 		qualify = true;
 		currentRowIsValid = false;
 		scanRepositioned = false;
+		
+		recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
Wed Aug  8 12:00:40 2007
@@ -82,7 +82,7 @@
 			  optimizerEstimatedRowCount, optimizerEstimatedCost);
         this.source1 = source1;
         this.source2 = source2;
-		constructorTime += getElapsedMillis(beginTime);
+        recordConstructorTime();
     }
 
 	//

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java?view=diff&rev=563985&r1=563984&r2=563985
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java Wed
Aug  8 12:00:40 2007
@@ -140,7 +140,7 @@
 		compileTimeConstants = (FormatableHashtable) (activation.getPreparedStatement().
 								getSavedObject(ctcNumber));
 
-		constructorTime += getElapsedMillis(beginTime);
+		recordConstructorTime();
     }
 
 	//



Mime
View raw message