From: kim Date: Fri, 30 Jan 2009 05:24:49 +0000 (+0000) Subject: . X-Git-Url: http://git.nguyen.vg/gitweb/?a=commitdiff_plain;h=ff0d1111e34d2aba9b6454e0c95b67bd38ba392c;hp=b7760799ea0d052916a0581fb0abe119d49e8a63;p=SXSI%2Fxpathcomp.git . git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/xpathcomp@97 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- diff --git a/benchmark/benchmark.ml b/benchmark/benchmark.ml index 5418b64..c726166 100644 --- a/benchmark/benchmark.ml +++ b/benchmark/benchmark.ml @@ -258,10 +258,10 @@ struct else Printf.printf "With output : \t%!"; for i = 1 to Conf.num_runs do let s = extract(run_query (k==1) (j==1) qnum docnum qset) in - if sres.(j).query_execution_time > s.query_execution_time - then sres.(j) <- s; - if (k==1) then - sres.(j).memory_usage <- s.memory_usage; + sres.(j).query_execution_time <- s.query_execution_time; + sres.(j).query_compile_time <- s.query_compile_time; + if j == 1 then sres.(j).serialization_time <- s.serialization_time; + if k == 1 then sres.(j).memory_usage <- s.memory_usage; Printf.printf "pass %i ... %!" i; done; Printf.printf "Ok\n%!"; diff --git a/benchmark/config.ml b/benchmark/config.ml deleted file mode 100644 index 422c0c4..0000000 --- a/benchmark/config.ml +++ /dev/null @@ -1,31 +0,0 @@ -(* semi-colon separated list of input documents *) -let documents = [ "../tests/tiny.xml" ] - -(* semi-colon separated list of XPath queries *) -let queries = [ "//para[ contains(.,\"international\") ]//acronym"; "//*//*//*//*"; "/*"; "//part//text()" ] - - -(* I is the initial configuration - * MK (engine) (configuration) gives a new configuration - * valid engines are SXSI and SaxonBXQuery - * ex: if you only want to test SaxonBXQuery : - * module TEST = MK (SaxonBXQuery) (I) - *) - -module CONF : CONFIGURATION = -struct - let path = "output" - let result_basename = "test" - let num_runs = 2 - let run_with_output = true - let run_without_output = true -end - -module I = INIT_TESTER (CONF) - -module TEST = - MK (SXSI) - (MK (XsltProc) - (MK (QizxOpen) - (MK (SaxonBXQuery) (I)))) - diff --git a/benchmark/config.ml.in b/benchmark/config.ml.in new file mode 100644 index 0000000..5d63b48 --- /dev/null +++ b/benchmark/config.ml.in @@ -0,0 +1,29 @@ +(* semi-colon separated list of input documents *) +let documents = [ "../tests/tiny.xml" ] + +(* semi-colon separated list of XPath queries *) +let queries = [ "//*" ] + + +(* I is the initial configuration + * MK (engine) (configuration) gives a new configuration + * valid engines are SXSI and SaxonBXQuery + * ex: if you only want to test SaxonBXQuery : + * module TEST = MK (SaxonBXQuery) (I) + *) + +module CONF : CONFIGURATION = +struct + let path = "output" + let result_basename = "test" + let num_runs = 2 + let run_with_output = true + let run_without_output = true +end + +module I = INIT_TESTER (CONF) + +module TEST = + MK (SXSI) + (MK (SaxonBXQuery) (I)) + diff --git a/benchmark/main.ml b/benchmark/main.ml index 111f421..b80faed 100644 --- a/benchmark/main.ml +++ b/benchmark/main.ml @@ -114,9 +114,10 @@ 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.iter ( fun i -> + print_newline (); + print_newline (); + print_stats Format.std_formatter i) k) s; Printf.printf "\n----------------------------------------\n" ) l