I have been running timing comparisons on VXQuery, and I created a patch to
implement the "-timing" command line argument. If you use this argument it
will output the total time in milliseconds.

Steven
Index: vxquery/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
===================================================================
--- vxquery/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java       
(revision 1523721)
+++ vxquery/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java       
(working copy)
@@ -20,6 +20,7 @@
 import java.io.StringReader;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.List;
@@ -80,6 +81,7 @@
     }
 
     public static void main(String[] args) throws Exception {
+        Date start = new Date();
         final CmdLineOptions opts = new CmdLineOptions();
         CmdLineParser parser = new CmdLineParser(opts);
         try {
@@ -94,6 +96,10 @@
         }
         VXQuery vxq = new VXQuery(opts);
         vxq.execute();
+        Date end = new Date();
+        if (opts.timing) {
+            System.out.println("Execution time: " + (end.getTime() - 
start.getTime()) + "ms");
+        }
     }
 
     private void execute() throws Exception {

Reply via email to