X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=benchmark%2Fmain.ml;h=fff21c3248973c792ddd3b9e83605e5679848132;hb=36154bd9b953b84d539d2505d94c414b2e3c72e6;hp=a761bc2a62c0c81c8234e06cf2b4e7c4e697a9e0;hpb=3623eefccfb5fc69e19ad975a3669f51a2a8b276;p=SXSI%2Fxpathcomp.git diff --git a/benchmark/main.ml b/benchmark/main.ml index a761bc2..fff21c3 100644 --- a/benchmark/main.ml +++ b/benchmark/main.ml @@ -62,7 +62,9 @@ struct let reference = false let time_factor = 1.0 let mk_queryfile b doc q out = () - let mk_cmdline b qout qfile doc q = [ doc; q ]@ (if b then [qout] else []) + let mk_cmdline b qout qfile doc q = + let doc' = (Filename.chop_suffix doc ".xml")^".srx" in + [ doc'; q ]@ (if b then [qout] else []) let parse_rules = [ ( ".*Parsing document :[ \\t]*\\([0-9]+\\.[0-9]*\\)ms.*", [ Input_parsing_time 1]); @@ -70,7 +72,7 @@ struct ( ".*Compiling query :[ \\t]*\\([0-9]+\\.[0-9]*\\)ms.*", [ Query_compile_time 1]); - ( ".*TopDown (No BackTrack) :[ \\t]*\\([0-9]+\\.[0-9]*\\)ms.*", + ( ".*Execution time :[ \\t]*\\([0-9]+\\.[0-9]*\\)ms.*", [ Query_execution_time 1]); ( ".*Serializing results :[ \\t]*\\([0-9]+\\.[0-9]*\\)ms.*", @@ -79,22 +81,17 @@ struct end -module CONF : CONFIGURATION = -struct - let path = "." - let result_basename = "test" - let num_runs = 5 - let run_with_output = true - let run_without_output = true -end -module I = INIT_TESTER (CONF) -module Test = MK (SXSI) (MK (SaxonBXQuery) (I)) +INCLUDE "config.ml" + -let l = Test.test_engine [] (make_queryset - ["/home/kim/Documents/Work/Code/xpathcomp/tests/small.xml"] - ["/descendant::*/descendant::*/descendant::*"]) +let l = TEST.test_engine [] (make_queryset + documents + queries + ) ;; + + List.iter (function (e,d),s -> Printf.printf "\n-------------- %s -----------------" e; Array.iter ( fun i ->