db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r887475 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
Date Sat, 05 Dec 2009 01:01:24 GMT
Author: bpendleton
Date: Sat Dec  5 01:01:23 2009
New Revision: 887475

URL: http://svn.apache.org/viewvc?rev=887475&view=rev
Log:
DERBY-4297: XplainStatisticsTest 'compilation time did not compute'

This change adjusts the technique used to compute the compileTime counter
in GenericStatement.prepMinion so that the following invariant will hold:

  parseTime + bindTime + optimizeTime + generateTime = compileTime

Previously, there was a small window after generateTime had been computed
but before compileTime had been recorded, during which the value of the
System.currentTimeMillis clock could change, resulting in a situation where
compileTime was too large, typically by 15 or 16 milliseconds.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java?rev=887475&r1=887474&r2=887475&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java Sat Dec
 5 01:01:23 2009
@@ -521,7 +521,7 @@
 						bindTime - parseTime, //bind time
 						optimizeTime - bindTime, //optimize time
 						generateTime - optimizeTime, //generate time
-						getElapsedTimeMillis(beginTime),
+						generateTime - beginTime, //total compile time
 						beginTimestamp,
 						endTimestamp);
 				}



Mime
View raw message