X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=tests%2Fnon_regression_tests%2Fsxsi.sh;h=6221e8312c48345b544c391db0bb7a28d7ea4fca;hb=refs%2Fheads%2Ftrack-xml-tree-better-doc;hp=0ef26c45e242f3b6d2bd94c11320c09634cca7df;hpb=a2080d362a3efaa221c72fd1deae48e966c49c98;p=SXSI%2Fxpathcomp.git diff --git a/tests/non_regression_tests/sxsi.sh b/tests/non_regression_tests/sxsi.sh index 0ef26c4..6221e83 100755 --- a/tests/non_regression_tests/sxsi.sh +++ b/tests/non_regression_tests/sxsi.sh @@ -4,6 +4,7 @@ source utils.sh function do_sxsi() { query="$1" + count="$4" doc=`basename "$2" .xml`.srx repeat="$3" TIME_MAT="" @@ -15,12 +16,17 @@ function do_sxsi() { NUM_RESULT=`echo "$output" | grep "Number of results" | grep -o '[0-9]*'` time=`echo "$output" | grep "Execution time" | cut -f 2 -d',' | cut -f1 -d ':' | grep -o '[0-9.]*'` TIME_COUNT=`echo "$time" | tail -n +2 | average` - - output=`./main.native -b -r "$3" "$doc" "$query" /dev/null 2>&1` - mtime=`echo "$output" | grep "Execution time" | cut -f 2 -d',' | cut -f1 -d ':'| grep -o '[0-9.]*'` - ptime=`echo "$output" | grep 'Serialization time' | cut -f 3 -d ' ' | grep -o '[0-9.]*'` - TIME_MAT=`echo "$mtime" | tail -n +2 | average` - TIME_PRINT="$ptime" + if [ -z "$count" ] + then + output=`./main.native -b -r "$3" "$doc" "$query" /dev/null 2>&1` + mtime=`echo "$output" | grep "Execution time" | cut -f 2 -d',' | cut -f1 -d ':'| grep -o '[0-9.]*'` + ptime=`echo "$output" | grep 'Serialization time' | cut -f 3 -d ' ' | grep -o '[0-9.]*'` + TIME_MAT=`echo "$mtime" | tail -n +2 | average` + TIME_PRINT="$ptime" + else + TIME_MAT="999999" + TIME_PRINT="0" + fi echo "$TIME_COUNT" echo "$TIME_MAT"