From: Kim Nguyễn Date: Mon, 22 Apr 2013 16:49:11 +0000 (+0200) Subject: Tune the Remakefile to re-run tests when the binary changes. X-Git-Tag: v0.1~91 X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=commitdiff_plain;h=318ebb395fe3665046b76cf4de6cf8166b94d4cc Tune the Remakefile to re-run tests when the binary changes. --- diff --git a/Remakefile.in b/Remakefile.in index 355b643..1958a02 100644 --- a/Remakefile.in +++ b/Remakefile.in @@ -148,7 +148,7 @@ distclean: clean ## Tests -test_suite: tools src/@PACKAGE_TARNAME@.native@EXE@ +test_suite: for i in tests/*.xml do @REMAKE@ "$i".summary @@ -157,7 +157,8 @@ test_suite: tools src/@PACKAGE_TARNAME@.native@EXE@ %.summary: base="${1%.xml.summary}" - @REMAKE@ "$base".xml "$base".xml.queries + @REMAKE@ "$base".xml "$base".xml.queries tools src/@PACKAGE_TARNAME@.native@EXE@ + rm -f "$1" cat "$base".xml.queries | grep -v '^#' | while read q query; do echo -n "$base"".xml $q $query ... " REF="$base".xml.results/"$q"_jaxp.xml @@ -166,7 +167,7 @@ test_suite: tools src/@PACKAGE_TARNAME@.native@EXE@ LOG="$base".xml.results/"$q"_@PACKAGE_TARNAME@.log src/@PACKAGE_TARNAME@.native@EXE@ -s "$base".xml \ "$query" "$OUTPUT" > "$LOG" 2>&1 - echo "Query: $q : $query" > "$1" + echo "Query: $q : $query" >> "$1" cat "$LOG" | grep '^STATS' >> "$1" echo -n "Diff: " >> "$1" tools/xml_diff.native "$REF" "$OUTPUT" >/dev/null 2>&1 diff --git a/src/eval.ml b/src/eval.ml index 1b58617..23d1685 100644 --- a/src/eval.ml +++ b/src/eval.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) INCLUDE "utils.ml" @@ -134,7 +134,7 @@ END Ata.reset auto; while !redo do redo := false; - Ata.reset auto; + Ata.reset auto; (* prevents the .cache2 and .cache4 memoization tables from growing too much *) redo := top_down_run auto tree node cache !iter; incr iter; done; diff --git a/src/tatoo.ml b/src/tatoo.ml index 6dc66ef..2c32062 100644 --- a/src/tatoo.ml +++ b/src/tatoo.ml @@ -14,23 +14,35 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) open Format +let time f arg msg = + let t1 = Unix.gettimeofday () in + let r = f arg in + let t2 = Unix.gettimeofday () in + let time = (t2 -. t1) *. 1000. in + if !Options.stats then fprintf err_formatter "@[STATS: %s: %fms@]@." msg time; + r + + let main () = let () = Options.parse () in let doc = let fd = open_in !Options.input_file in - let d = Naive_tree.load_xml_file fd in + let d = time Naive_tree.load_xml_file fd "parsing xml document" in close_in fd; d in let query = - Xpath.Parser.parse (Ulexing.from_latin1_string !Options.query) + time + Xpath.Parser.parse + (Ulexing.from_latin1_string !Options.query) + "parsing XPath query" in let auto = - Xpath.Compile.path query + time Xpath.Compile.path query "compiling XPath query" in let output = match !Options.output_file with @@ -43,11 +55,12 @@ let main () = Ata.print err_formatter auto; fprintf err_formatter "@]@]@."; end; + let module Naive = Eval.Make(Naive_tree) in - let t1 = Unix.gettimeofday() in - let results = Naive.eval auto doc (Naive_tree.root doc) in - let teval = (Unix.gettimeofday () -. t1) *. 1000. in - let t1 = Unix.gettimeofday () in + let results = + time (Naive.eval auto doc) (Naive_tree.root doc) "evaluating query" + in + time (fun () -> output_string output "\n"; if !Options.count then begin output_string output (string_of_int (List.length results)); @@ -58,13 +71,10 @@ let main () = output_char output '\n' ) results; output_string output "\n"; - let tprint = (Unix.gettimeofday () -. t1) *. 1000. in flush output; - if output != stdout then close_out output; - if !Options.stats then begin - fprintf err_formatter "@[STATS: evaluation time: %fms@]@." teval; - fprintf err_formatter "@[STATS: serialization time: %fms@]@." tprint - end + if output != stdout then close_out output + +) () "serializing results" let () = diff --git a/tests/alphabet.xml.summary b/tests/alphabet.xml.summary index bf9f0ec..5b57a8a 100644 --- a/tests/alphabet.xml.summary +++ b/tests/alphabet.xml.summary @@ -1,8 +1,487 @@ +Query: A1 : //L/* +STATS: parsing xml document: 0.373125ms +STATS: parsing XPath query: 0.056982ms +STATS: compiling XPath query: 0.371933ms +STATS: Query: /descendant-or-self::node()/child::L/child::* +STATS: Automaton: +STATS: evaluating query: 2.438068ms +STATS: serializing results: 1.538038ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: A2 : //L/parent::* +STATS: parsing xml document: 0.387907ms +STATS: parsing XPath query: 0.049114ms +STATS: compiling XPath query: 0.173092ms +STATS: Query: /descendant-or-self::node()/child::L/parent::* +STATS: Automaton: +STATS: evaluating query: 2.977848ms +STATS: serializing results: 2.058983ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1310 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1464, used: 154, occupation: 0.105191 +Diff: ok +------------------------------------------- +Query: A3 : //L/descendant::* +STATS: parsing xml document: 0.375032ms +STATS: parsing XPath query: 0.044107ms +STATS: compiling XPath query: 0.216961ms +STATS: Query: /descendant-or-self::node()/child::L/descendant::* +STATS: Automaton: +STATS: evaluating query: 2.354145ms +STATS: serializing results: 1.631975ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 918 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1060, used: 142, occupation: 0.133962 +Diff: ok +------------------------------------------- +Query: A4 : //L/descendant-or-self::* +STATS: parsing xml document: 0.375032ms +STATS: parsing XPath query: 0.046015ms +STATS: compiling XPath query: 0.190973ms +STATS: Query: /descendant-or-self::node()/child::L/descendant-or-self::* +STATS: Automaton: +STATS: evaluating query: 2.285004ms +STATS: serializing results: 1.811981ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 918 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1060, used: 142, occupation: 0.133962 +Diff: ok +------------------------------------------- +Query: A5 : //L/ancestor::* +STATS: parsing xml document: 0.500917ms +STATS: parsing XPath query: 0.043154ms +STATS: compiling XPath query: 0.171900ms +STATS: Query: /descendant-or-self::node()/child::L/ancestor::* +STATS: Automaton: +STATS: evaluating query: 2.166986ms +STATS: serializing results: 2.167940ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1320 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1476, used: 156, occupation: 0.105691 +Diff: ok +------------------------------------------- +Query: A6 : //L/ancestor-or-self::* +STATS: parsing xml document: 0.383139ms +STATS: parsing XPath query: 0.045061ms +STATS: compiling XPath query: 0.215769ms +STATS: Query: /descendant-or-self::node()/child::L/ancestor-or-self::* +STATS: Automaton: +STATS: evaluating query: 2.175808ms +STATS: serializing results: 2.177000ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1242 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1397, used: 155, occupation: 0.110952 +Diff: ok +------------------------------------------- +Query: A7 : //L/following-sibling::* +STATS: parsing xml document: 0.408888ms +STATS: parsing XPath query: 0.045061ms +STATS: compiling XPath query: 0.169039ms +STATS: Query: /descendant-or-self::node()/child::L/following-sibling::* +STATS: Automaton: +STATS: evaluating query: 2.287149ms +STATS: serializing results: 1.610041ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1051 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1173, used: 122, occupation: 0.104007 +Diff: ok +------------------------------------------- +Query: A8 : //L/preceding-sibling::* +STATS: parsing xml document: 0.376940ms +STATS: parsing XPath query: 0.051022ms +STATS: compiling XPath query: 0.169039ms +STATS: Query: /descendant-or-self::node()/child::L/preceding-sibling::* +STATS: Automaton: +STATS: evaluating query: 2.012014ms +STATS: serializing results: 4.889965ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1174 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1314, used: 140, occupation: 0.106545 +Diff: ok +------------------------------------------- +Query: A9 : //L/following::* +STATS: parsing xml document: 0.383854ms +STATS: parsing XPath query: 0.048876ms +STATS: compiling XPath query: 0.290155ms +STATS: Query: /descendant-or-self::node()/child::L/ancestor-or-self::node()/following-sibling::node()/descendant-or-self::* +STATS: Automaton: +STATS: evaluating query: 6.689072ms +STATS: serializing results: 1.752138ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 2104 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 2334, used: 230, occupation: 0.098543 +Diff: ok +------------------------------------------- +Query: A10 : //L/preceding::* +STATS: parsing xml document: 0.398874ms +STATS: parsing XPath query: 0.051975ms +STATS: compiling XPath query: 0.268936ms +STATS: Query: /descendant-or-self::node()/child::L/ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::* +STATS: Automaton: +STATS: evaluating query: 4.401922ms +STATS: serializing results: 1.770020ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 942 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1077, used: 135, occupation: 0.125348 +Diff: ok +------------------------------------------- +Query: A11 : //L/self::* +STATS: parsing xml document: 0.379801ms +STATS: parsing XPath query: 0.043869ms +STATS: compiling XPath query: 0.163078ms +STATS: Query: /descendant-or-self::node()/child::L/self::* +STATS: Automaton: +STATS: evaluating query: 1.757860ms +STATS: serializing results: 1.677990ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 837 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 946, used: 109, occupation: 0.115222 +Diff: ok +------------------------------------------- +Query: A12 : //L/@id/parent::* +STATS: parsing xml document: 0.378132ms +STATS: parsing XPath query: 0.054836ms +STATS: compiling XPath query: 0.246048ms +STATS: Query: /descendant-or-self::node()/child::L/attribute::@id/parent::* +STATS: Automaton: +STATS: evaluating query: 3.379107ms +STATS: serializing results: 1.619816ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1594 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1750, used: 156, occupation: 0.089143 +Diff: ok +------------------------------------------- +Query: P1 : //*[L] +STATS: parsing xml document: 0.555038ms +STATS: parsing XPath query: 0.041008ms +STATS: compiling XPath query: 0.166178ms +STATS: Query: /descendant-or-self::node()/child::*[ child::L ] +STATS: Automaton: +STATS: evaluating query: 2.022982ms +STATS: serializing results: 1.830816ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1326 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1480, used: 154, occupation: 0.104054 +Diff: ok +------------------------------------------- +Query: P2 : //*[parent::L] +STATS: parsing xml document: 0.520945ms +STATS: parsing XPath query: 0.064850ms +STATS: compiling XPath query: 0.242949ms +STATS: Query: /descendant-or-self::node()/child::*[ parent::L ] +STATS: Automaton: +STATS: evaluating query: 2.733946ms +STATS: serializing results: 1.567841ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: P3 : //*[descendant::L] +STATS: parsing xml document: 0.395775ms +STATS: parsing XPath query: 0.046015ms +STATS: compiling XPath query: 0.176191ms +STATS: Query: /descendant-or-self::node()/child::*[ descendant::L ] +STATS: Automaton: +STATS: evaluating query: 1.870871ms +STATS: serializing results: 2.191067ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1336 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1492, used: 156, occupation: 0.104558 +Diff: ok +------------------------------------------- +Query: P4 : //*[descendant-or-self::L] +STATS: parsing xml document: 0.369072ms +STATS: parsing XPath query: 0.043869ms +STATS: compiling XPath query: 0.174046ms +STATS: Query: /descendant-or-self::node()/child::*[ descendant-or-self::L ] +STATS: Automaton: +STATS: evaluating query: 2.180099ms +STATS: serializing results: 2.135038ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1242 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1397, used: 155, occupation: 0.110952 +Diff: ok +------------------------------------------- +Query: P5 : //*[ancestor::L] +STATS: parsing xml document: 0.398874ms +STATS: parsing XPath query: 0.059128ms +STATS: compiling XPath query: 0.276089ms +STATS: Query: /descendant-or-self::node()/child::*[ ancestor::L ] +STATS: Automaton: +STATS: evaluating query: 1.901865ms +STATS: serializing results: 1.575232ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 918 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1060, used: 142, occupation: 0.133962 +Diff: ok +------------------------------------------- +Query: P6 : //*[ancestor-or-self::L] +STATS: parsing xml document: 0.487089ms +STATS: parsing XPath query: 0.046968ms +STATS: compiling XPath query: 0.190973ms +STATS: Query: /descendant-or-self::node()/child::*[ ancestor-or-self::L ] +STATS: Automaton: +STATS: evaluating query: 1.915932ms +STATS: serializing results: 1.822233ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 918 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1060, used: 142, occupation: 0.133962 +Diff: ok +------------------------------------------- +Query: P7 : //*[following-sibling::L] +STATS: parsing xml document: 0.407934ms +STATS: parsing XPath query: 0.028133ms +STATS: compiling XPath query: 0.077963ms +STATS: Query: /descendant-or-self::node()/child::*[ following-sibling::L ] +STATS: Automaton: +STATS: evaluating query: 1.742125ms +STATS: serializing results: 1.702070ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1174 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1314, used: 140, occupation: 0.106545 +Diff: ok +------------------------------------------- +Query: P8 : //*[preceding-sibling::L] +STATS: parsing xml document: 0.378847ms +STATS: parsing XPath query: 0.052929ms +STATS: compiling XPath query: 0.164986ms +STATS: Query: /descendant-or-self::node()/child::*[ preceding-sibling::L ] +STATS: Automaton: +STATS: evaluating query: 1.487970ms +STATS: serializing results: 1.522064ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1051 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1173, used: 122, occupation: 0.104007 +Diff: ok +------------------------------------------- +Query: P9 : //*[following::L] +STATS: parsing xml document: 0.377178ms +STATS: parsing XPath query: 0.048161ms +STATS: compiling XPath query: 0.226021ms +STATS: Query: /descendant-or-self::node()/child::*[ ancestor-or-self::node()/following-sibling::node()/descendant-or-self::L ] +STATS: Automaton: +STATS: evaluating query: 6.520033ms +STATS: serializing results: 1.826048ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 780 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 915, used: 135, occupation: 0.147541 +Diff: ok +------------------------------------------- +Query: P10 : //*[preceding::L] +STATS: parsing xml document: 0.375986ms +STATS: parsing XPath query: 0.051022ms +STATS: compiling XPath query: 0.226021ms +STATS: Query: /descendant-or-self::node()/child::*[ ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::L ] +STATS: Automaton: +STATS: evaluating query: 6.186008ms +STATS: serializing results: 1.768112ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1767 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1980, used: 213, occupation: 0.107576 +Diff: ok +------------------------------------------- +Query: P11 : //*[self::L] +STATS: parsing xml document: 0.464916ms +STATS: parsing XPath query: 0.068903ms +STATS: compiling XPath query: 0.159979ms +STATS: Query: /descendant-or-self::node()/child::*[ self::L ] +STATS: Automaton: +STATS: evaluating query: 1.491070ms +STATS: serializing results: 1.654863ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 837 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 946, used: 109, occupation: 0.115222 +Diff: ok +------------------------------------------- +Query: P12 : //*[@id] +STATS: parsing xml document: 0.381947ms +STATS: parsing XPath query: 0.037909ms +STATS: compiling XPath query: 0.167847ms +STATS: Query: /descendant-or-self::node()/child::*[ attribute::@id ] +STATS: Automaton: +STATS: evaluating query: 1.470089ms +STATS: serializing results: 2.379894ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 907 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 1022, used: 115, occupation: 0.112524 +Diff: ok +------------------------------------------- +Query: T1 : //L/text() +STATS: parsing xml document: 0.394821ms +STATS: parsing XPath query: 0.074863ms +STATS: compiling XPath query: 0.215054ms +STATS: Query: /descendant-or-self::node()/child::L/child::text() +STATS: Automaton: +STATS: evaluating query: 2.219915ms +STATS: serializing results: 1.530886ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: T2 : //L/comment() +STATS: parsing xml document: 0.375986ms +STATS: parsing XPath query: 0.059128ms +STATS: compiling XPath query: 0.207186ms +STATS: Query: /descendant-or-self::node()/child::L/child::comment() +STATS: Automaton: +STATS: evaluating query: 2.162933ms +STATS: serializing results: 1.442909ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: T3 : //L/processing-instruction() +STATS: parsing xml document: 0.597000ms +STATS: parsing XPath query: 0.087976ms +STATS: compiling XPath query: 0.222921ms +STATS: Query: /descendant-or-self::node()/child::L/child::processing-instruction() +STATS: Automaton: +STATS: evaluating query: 0.879049ms +STATS: serializing results: 1.473904ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: T4 : //L/processing-instruction("myPI") +STATS: parsing xml document: 0.383854ms +STATS: parsing XPath query: 0.077963ms +STATS: compiling XPath query: 0.201941ms +STATS: Query: /descendant-or-self::node()/child::L/child::processing-instruction('?myPI') +STATS: Automaton: +STATS: evaluating query: 2.202988ms +STATS: serializing results: 1.402140ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: T5 : //L/node() +STATS: parsing xml document: 0.417948ms +STATS: parsing XPath query: 0.055790ms +STATS: compiling XPath query: 0.195980ms +STATS: Query: /descendant-or-self::node()/child::L/child::node() +STATS: Automaton: +STATS: evaluating query: 2.192020ms +STATS: serializing results: 1.589060ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: T6 : //L/N +STATS: parsing xml document: 0.374079ms +STATS: parsing XPath query: 0.043154ms +STATS: compiling XPath query: 0.210047ms +STATS: Query: /descendant-or-self::node()/child::L/child::N +STATS: Automaton: +STATS: evaluating query: 2.251863ms +STATS: serializing results: 1.713991ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 819 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 952, used: 133, occupation: 0.139706 +Diff: ok +------------------------------------------- +Query: T7 : //L/* +STATS: parsing xml document: 0.376940ms +STATS: parsing XPath query: 0.038147ms +STATS: compiling XPath query: 0.208139ms +STATS: Query: /descendant-or-self::node()/child::L/child::* +STATS: Automaton: +STATS: evaluating query: 2.440214ms +STATS: serializing results: 1.535892ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 809 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 933, used: 124, occupation: 0.132905 +Diff: ok +------------------------------------------- +Query: O1 : //*[child::* and preceding::Q] +STATS: parsing xml document: 0.399113ms +STATS: parsing XPath query: 0.065088ms +STATS: compiling XPath query: 0.272989ms +STATS: Query: /descendant-or-self::node()/child::*[ child::* and ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::Q ] +STATS: Automaton: +STATS: evaluating query: 5.662918ms +STATS: serializing results: 1.690865ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1873 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 2090, used: 217, occupation: 0.103828 +Diff: ok +------------------------------------------- +Query: O2 : //*[not(child::*) and preceding::Q] +STATS: parsing xml document: 0.393867ms +STATS: parsing XPath query: 0.077009ms +STATS: compiling XPath query: 0.274181ms +STATS: Query: /descendant-or-self::node()/child::*[ not(child::*) and ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::Q ] +STATS: Automaton: +STATS: evaluating query: 5.995035ms +STATS: serializing results: 1.695871ms +STATS: 1 iterations +STATS: automaton 0, cache2: 70 entries, cache6: 1873 entries +STATS: cache2: length: 105, used: 35, occupation: 0.333333 +STATS: cache4: length: 2090, used: 217, occupation: 0.103828 +Diff: ok +------------------------------------------- +Query: O3 : //*[preceding::L or following::L] +STATS: parsing xml document: 0.380993ms +STATS: parsing XPath query: 0.067949ms +STATS: compiling XPath query: 0.332832ms +STATS: Query: /descendant-or-self::node()/child::*[ ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::L or ancestor-or-self::node()/following-sibling::node()/descendant-or-self::L ] +STATS: Automaton: +STATS: evaluating query: 11.430025ms +STATS: serializing results: 1.812935ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 610 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 778, used: 168, occupation: 0.215938 +Diff: ok +------------------------------------------- Query: O4 : //L/ancestor::* | //L/descendant::* +STATS: parsing xml document: 0.386953ms +STATS: parsing XPath query: 0.051975ms +STATS: compiling XPath query: 0.380039ms STATS: Query: /descendant-or-self::node()/child::L/ancestor::* | /descendant-or-self::node()/child::L/descendant::* STATS: Automaton: -STATS: evaluation time: 7.114887ms -STATS: serialization time: 0.150919ms +STATS: evaluating query: 7.618904ms +STATS: serializing results: 2.229929ms STATS: 1 iterations STATS: automaton 0, cache2: 70 entries, cache6: 2345 entries STATS: cache2: length: 105, used: 35, occupation: 0.333333 diff --git a/tests/comments00.xml.summary b/tests/comments00.xml.summary index e04988d..ab4184b 100644 --- a/tests/comments00.xml.summary +++ b/tests/comments00.xml.summary @@ -1,8 +1,11 @@ Query: C0 : /descendant::comment() +STATS: parsing xml document: 0.116110ms +STATS: parsing XPath query: 0.055075ms +STATS: compiling XPath query: 0.095844ms STATS: Query: /descendant::comment() STATS: Automaton: -STATS: evaluation time: 0.082016ms -STATS: serialization time: 0.002861ms +STATS: evaluating query: 0.092030ms +STATS: serializing results: 1.443863ms STATS: 1 iterations STATS: automaton 0, cache2: 6 entries, cache6: 18 entries STATS: cache2: length: 9, used: 3, occupation: 0.333333 diff --git a/tests/xmark_small.xml.summary b/tests/xmark_small.xml.summary index 15df64b..e837f9d 100644 --- a/tests/xmark_small.xml.summary +++ b/tests/xmark_small.xml.summary @@ -1,8 +1,291 @@ +Query: A1 : /site/closed_auctions/closed_auction/annotation/description/text/keyword +STATS: parsing xml document: 189.342976ms +STATS: parsing XPath query: 0.099182ms +STATS: compiling XPath query: 3.221035ms +STATS: Query: /child::site/child::closed_auctions/child::closed_auction/child::annotation/child::description/child::text/child::keyword +STATS: Automaton: +STATS: evaluating query: 118.613005ms +STATS: serializing results: 3.257036ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 3149 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 3464, used: 315, occupation: 0.090935 +Diff: ok +------------------------------------------- +Query: A2 : //closed_auction//keyword +STATS: parsing xml document: 186.474085ms +STATS: parsing XPath query: 0.053883ms +STATS: compiling XPath query: 2.933979ms +STATS: Query: /descendant-or-self::node()/child::closed_auction/descendant-or-self::node()/child::keyword +STATS: Automaton: +STATS: evaluating query: 137.715101ms +STATS: serializing results: 6.551981ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 2681 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 2915, used: 234, occupation: 0.080274 +Diff: ok +------------------------------------------- +Query: A3 : /site/closed_auctions/closed_auction//keyword +STATS: parsing xml document: 181.292057ms +STATS: parsing XPath query: 0.066996ms +STATS: compiling XPath query: 2.920151ms +STATS: Query: /child::site/child::closed_auctions/child::closed_auction/descendant-or-self::node()/child::keyword +STATS: Automaton: +STATS: evaluating query: 132.193089ms +STATS: serializing results: 6.663799ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 3277 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 3555, used: 278, occupation: 0.078200 +Diff: ok +------------------------------------------- +Query: A4 : /site/closed_auctions/closed_auction[annotation/description/text/keyword]/date +STATS: parsing xml document: 197.504044ms +STATS: parsing XPath query: 0.107050ms +STATS: compiling XPath query: 2.917767ms +STATS: Query: /child::site/child::closed_auctions/child::closed_auction[ child::annotation/child::description/child::text/child::keyword ]/child::date +STATS: Automaton: +STATS: evaluating query: 177.830935ms +STATS: serializing results: 2.011061ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 1324 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1501, used: 177, occupation: 0.117921 +Diff: ok +------------------------------------------- +Query: A5 : /site/closed_auctions/closed_auction[descendant::keyword]/date +STATS: parsing xml document: 187.441826ms +STATS: parsing XPath query: 0.078917ms +STATS: compiling XPath query: 2.928019ms +STATS: Query: /child::site/child::closed_auctions/child::closed_auction[ descendant::keyword ]/child::date +STATS: Automaton: +STATS: evaluating query: 176.529169ms +STATS: serializing results: 2.455950ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 1170 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1328, used: 158, occupation: 0.118976 +Diff: ok +------------------------------------------- +Query: A6 : /site/people/person[profile/gender and profile/age]/name +STATS: parsing xml document: 185.663939ms +STATS: parsing XPath query: 0.100136ms +STATS: compiling XPath query: 3.006935ms +STATS: Query: /child::site/child::people/child::person[ child::profile/child::gender and child::profile/child::age ]/child::name +STATS: Automaton: +STATS: evaluating query: 173.422098ms +STATS: serializing results: 2.562046ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 2174 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 2385, used: 211, occupation: 0.088470 +Diff: ok +------------------------------------------- +Query: A7 : /site/people/person[phone or homepage]/name +STATS: parsing xml document: 187.916040ms +STATS: parsing XPath query: 0.087976ms +STATS: compiling XPath query: 6.510973ms +STATS: Query: /child::site/child::people/child::person[ child::phone or child::homepage ]/child::name +STATS: Automaton: +STATS: evaluating query: 171.716928ms +STATS: serializing results: 4.863977ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 1728 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1927, used: 199, occupation: 0.103269 +Diff: ok +------------------------------------------- +Query: A8 : /site/people/person[address and (phone or homepage) and (creditcard or profile)]/name +STATS: parsing xml document: 188.562870ms +STATS: parsing XPath query: 0.117064ms +STATS: compiling XPath query: 2.850771ms +STATS: Query: /child::site/child::people/child::person[ child::address and (child::phone or child::homepage) and (child::creditcard or child::profile) ]/child::name +STATS: Automaton: +STATS: evaluating query: 181.411982ms +STATS: serializing results: 3.045082ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 9331 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 10253, used: 922, occupation: 0.089925 +Diff: ok +------------------------------------------- +Query: B1 : /site/regions/*/item[parent::namerica or parent::samerica]/name +STATS: parsing xml document: 194.905043ms +STATS: parsing XPath query: 0.095844ms +STATS: compiling XPath query: 3.118992ms +STATS: Query: /child::site/child::regions/child::*/child::item[ parent::namerica or parent::samerica ]/child::name +STATS: Automaton: +STATS: evaluating query: 132.170916ms +STATS: serializing results: 3.645182ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 3466 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 3760, used: 294, occupation: 0.078191 +Diff: ok +------------------------------------------- +Query: B2 : //keyword/ancestor::listitem/text/keyword +STATS: parsing xml document: 185.543060ms +STATS: parsing XPath query: 0.046015ms +STATS: compiling XPath query: 2.823830ms +STATS: Query: /descendant-or-self::node()/child::keyword/ancestor::listitem/child::text/child::keyword +STATS: Automaton: +STATS: evaluating query: 205.960035ms +STATS: serializing results: 13.362885ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 2331 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 2619, used: 288, occupation: 0.109966 +Diff: ok +------------------------------------------- +Query: B3 : /site/open_auctions/open_auction/bidder[following-sibling::bidder] +STATS: parsing xml document: 195.019007ms +STATS: parsing XPath query: 0.078917ms +STATS: compiling XPath query: 6.683826ms +STATS: Query: /child::site/child::open_auctions/child::open_auction/child::bidder[ following-sibling::bidder ] +STATS: Automaton: +STATS: evaluating query: 129.492044ms +STATS: serializing results: 31.605959ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 2871 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 3131, used: 260, occupation: 0.083041 +Diff: ok +------------------------------------------- +Query: B4 : /site/open_auctions/open_auction/bidder[preceding-sibling::bidder] +STATS: parsing xml document: 189.008951ms +STATS: parsing XPath query: 0.082016ms +STATS: compiling XPath query: 2.869129ms +STATS: Query: /child::site/child::open_auctions/child::open_auction/child::bidder[ preceding-sibling::bidder ] +STATS: Automaton: +STATS: evaluating query: 122.668982ms +STATS: serializing results: 31.919956ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 2282 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 2507, used: 225, occupation: 0.089749 +Diff: ok +------------------------------------------- +Query: B5 : /site/regions/*/item[following::item]/name +STATS: parsing xml document: 188.519955ms +STATS: parsing XPath query: 0.054121ms +STATS: compiling XPath query: 2.942085ms +STATS: Query: /child::site/child::regions/child::*/child::item[ ancestor-or-self::node()/following-sibling::node()/descendant-or-self::item ]/child::name +STATS: Automaton: +STATS: evaluating query: 199.170113ms +STATS: serializing results: 5.816936ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 1992 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 2302, used: 310, occupation: 0.134666 +Diff: ok +------------------------------------------- +Query: B6 : /site/regions/*/item[preceding::item]/name +STATS: parsing xml document: 185.217857ms +STATS: parsing XPath query: 0.087023ms +STATS: compiling XPath query: 2.945900ms +STATS: Query: /child::site/child::regions/child::*/child::item[ ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::item ]/child::name +STATS: Automaton: +STATS: evaluating query: 138.599873ms +STATS: serializing results: 5.795002ms +STATS: 1 iterations +STATS: automaton 0, cache2: 170 entries, cache6: 4419 entries +STATS: cache2: length: 255, used: 85, occupation: 0.333333 +STATS: cache4: length: 4800, used: 381, occupation: 0.079375 +Diff: ok +------------------------------------------- +Query: B7 : //person[profile/@income]/name +STATS: parsing xml document: 186.985970ms +STATS: parsing XPath query: 0.077009ms +STATS: compiling XPath query: 2.740145ms +STATS: Query: /descendant-or-self::node()/child::person[ child::profile/attribute::@income ]/child::name +STATS: Automaton: +STATS: evaluating query: 182.914972ms +STATS: serializing results: 3.901958ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 1238 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1349, used: 111, occupation: 0.082283 +Diff: ok +------------------------------------------- +Query: B8 : /site/open_auctions/open_auction[bidder and not(bidder/preceding-sibling::bidder)]/interval +STATS: parsing xml document: 205.939054ms +STATS: parsing XPath query: 0.105858ms +STATS: compiling XPath query: 2.954006ms +STATS: Query: /child::site/child::open_auctions/child::open_auction[ child::bidder and not(child::bidder/preceding-sibling::bidder) ]/child::interval +STATS: Automaton: +STATS: evaluating query: 174.728155ms +STATS: serializing results: 2.571106ms +STATS: 2 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 1052 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1229, used: 177, occupation: 0.144020 +Diff: ok +------------------------------------------- +Query: B9 : /site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) or (bidder/following::bidder and bidder/preceding::bidder)]/interval +STATS: parsing xml document: 176.476002ms +STATS: parsing XPath query: 0.150919ms +STATS: compiling XPath query: 9.018898ms +STATS: Query: /child::site/child::open_auctions/child::open_auction[ not(child::bidder/ancestor-or-self::node()/following-sibling::node()/descendant-or-self::bidder) or not(child::bidder/ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::bidder) or child::bidder/ancestor-or-self::node()/following-sibling::node()/descendant-or-self::bidder and child::bidder/ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::bidder ]/child::interval +STATS: Automaton: +STATS: evaluating query: 264.751196ms +STATS: serializing results: 6.420135ms +STATS: 3 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 786 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 976, used: 190, occupation: 0.194672 +Diff: ok +------------------------------------------- +Query: B10 : /site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) and (bidder/following::bidder and bidder/preceding::bidder)]/interval +STATS: parsing xml document: 188.203096ms +STATS: parsing XPath query: 0.151873ms +STATS: compiling XPath query: 3.212929ms +STATS: Query: /child::site/child::open_auctions/child::open_auction[ (not(child::bidder/ancestor-or-self::node()/following-sibling::node()/descendant-or-self::bidder) or not(child::bidder/ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::bidder)) and child::bidder/ancestor-or-self::node()/following-sibling::node()/descendant-or-self::bidder and child::bidder/ancestor-or-self::node()/preceding-sibling::node()/descendant-or-self::bidder ]/child::interval +STATS: Automaton: +STATS: evaluating query: 265.222073ms +STATS: serializing results: 1.528025ms +STATS: 3 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 827 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 1000, used: 173, occupation: 0.173000 +Diff: ok +------------------------------------------- +Query: B11 : //open_auction/bidder/../bidder/../bidder/../interval +STATS: parsing xml document: 186.342955ms +STATS: parsing XPath query: 0.068903ms +STATS: compiling XPath query: 3.041029ms +STATS: Query: /descendant-or-self::node()/child::open_auction/child::bidder/parent::node()/child::bidder/parent::node()/child::bidder/parent::node()/child::interval +STATS: Automaton: +STATS: evaluating query: 295.202971ms +STATS: serializing results: 6.148815ms +STATS: 4 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 598 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 708, used: 110, occupation: 0.155367 +Diff: ok +------------------------------------------- +Query: B12 : //item/@id/../@id/../@id/../@id/../name +STATS: parsing xml document: 192.172050ms +STATS: parsing XPath query: 0.123024ms +STATS: compiling XPath query: 2.965927ms +STATS: Query: /descendant-or-self::node()/child::item/attribute::@id/parent::node()/attribute::@id/parent::node()/attribute::@id/parent::node()/attribute::@id/parent::node()/child::name +STATS: Automaton: +STATS: evaluating query: 366.529942ms +STATS: serializing results: 5.742073ms +STATS: 5 iterations +STATS: automaton 0, cache2: 0 entries, cache6: 870 entries +STATS: cache2: length: 0, used: 0, occupation: -nan +STATS: cache4: length: 993, used: 123, occupation: 0.123867 +Diff: ok +------------------------------------------- Query: B13 : //keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword +STATS: parsing xml document: 194.238186ms +STATS: parsing XPath query: 0.097990ms +STATS: compiling XPath query: 2.928972ms STATS: Query: /descendant-or-self::node()/child::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword STATS: Automaton: -STATS: evaluation time: 294.135094ms -STATS: serialization time: 1.837015ms +STATS: evaluating query: 291.106939ms +STATS: serializing results: 14.529943ms STATS: 4 iterations STATS: automaton 0, cache2: 0 entries, cache6: 2671 entries STATS: cache2: length: 0, used: 0, occupation: -nan