cherry pick from local- branch
[SXSI/xpathcomp.git] / benchmark / main.ml
index 111f421..365832f 100644 (file)
@@ -114,9 +114,13 @@ let l = TEST.test_engine [] (make_queryset
 
 List.iter (function (e,d),s -> 
             Printf.printf "\n--------------  %s   -----------------" e;
-            Array.iter ( fun i ->
-              print_newline ();
-              print_newline ();
-              print_stats Format.std_formatter i) (List.hd s);
+            List.iter (fun k -> 
+                         Array.iteri ( fun i f ->
+                                        if (CONF.run_with_output && i=1) || (CONF.run_without_output && i = 0)
+                                        then begin
+                                        print_newline ();
+                                        print_stats Format.std_formatter f;
+                                        end
+                                        ) k) s;
             Printf.printf "\n----------------------------------------\n"
          ) l