X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=benchmark%2Fmain.ml;h=365832f9561d206e5b65273dd79e072d482582c5;hb=0c2338bfcdae0df1c68112a10247dc4e68a483ff;hp=98a9519ba144fdf5cf67de2eb21a07074b4b3530;hpb=95367aa932a9e179976e59ea326542c50905f5b3;p=SXSI%2Fxpathcomp.git diff --git a/benchmark/main.ml b/benchmark/main.ml index 98a9519..365832f 100644 --- a/benchmark/main.ml +++ b/benchmark/main.ml @@ -27,6 +27,26 @@ Saxon 9.0.0.4J from Saxonica" let reference = false end +module QizxOpen : ENGINE = +struct + let name = "QizxOpen" + + (* Todo call the binary to actually compute the version string *) + let description = +"QizX/Open v2.1 +Java version 1.6.0_0" + let command = "/usr/local/qizxopen-2.1/bin/qizx" + let reference = false + let time_factor = 1.0 + let mk_queryfile b doc q out = build_xquery doc q out b + let mk_cmdline b qout qfile _ _ = [ "-v" ; "-out"^ (if b then qout else "/dev/null");"-q"; qfile ] + let parse_rules = [ + (".*display time: \\([0-9]+\\) ms.*", + [ Query_execution_time 1 ]); + ] + let reference = false +end + module XsltProc : ENGINE = struct let name = "XSLTProc" @@ -62,7 +82,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]); @@ -79,34 +101,26 @@ 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/tiny.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 -> - 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