Use System.nanoTime on JDK 1.5 and higher to get finer precision internal
measurements
--------------------------------------------------------------------------------------
Key: DERBY-4462
URL: https://issues.apache.org/jira/browse/DERBY-4462
Project: Derby
Issue Type: Improvement
Components: SQL
Reporter: Bryan Pendleton
Priority: Minor
Derby uses System.currentTimeMillis() to compute the internal elapsed time of
certain operations.
For example, the parseTime, bindTime, optimizeTime, generateTime, and
compileTime measurements
that are computed by GenericStatement.prepMinion use this technique.
System.currentTimeMillis is not terribly accurate, since it is only updated 60
times a second; this
means that it doesn't give very good information about operations that take
less than 16 milliseconds,
and the compilation time of a SQL statement is often shorter than that.
As Knut Anders observes, we could use System.nanoTime, which is available in
JDK 1.5 and above,
to make more precise measurements.
See DERBY-4297 for some related observations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.