bench-xpath.sh 605 Bytes
Newer Older
Sylvain Schmitz's avatar
Sylvain Schmitz committed
1 2 3 4
#!/bin/bash

# path to benchmark files
path=$1
Sylvain Schmitz's avatar
Sylvain Schmitz committed
5
full=$2
6 7
xmlarray=($(grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*benchmark\/\(.*\)-full.xml.*/\1/'))
names=($(grep 'type="\(xslt\|xquery\)"' benchmarks-all-full.xml | sed -e 's/.*name="\(.*\)".*/\1/'))
Sylvain Schmitz's avatar
Sylvain Schmitz committed
8

Sylvain Schmitz's avatar
Sylvain Schmitz committed
9 10 11
echo "\\toprule"
echo "Source & queries & XPath~1.0 & XPath~2.0 & XPath~3.0\\\\"
echo "\\midrule"
Sylvain Schmitz's avatar
Sylvain Schmitz committed
12 13 14 15

for ((i = 0; i < ${#xmlarray[@]}; ++i))
do
    printf "${names[$i]} "
16
    echo "`./numbers.sh $path/${xmlarray[$i]}$full.xml '<schemas>' 'xpath-1.0.rnc.*yes' 'xpath-2.0.rnc.*yes' 'xpath-3.0.rnc.*yes'`\\\\"
Sylvain Schmitz's avatar
Sylvain Schmitz committed
17
done
Sylvain Schmitz's avatar
Sylvain Schmitz committed
18
echo "\\bottomrule"
Sylvain Schmitz's avatar
Sylvain Schmitz committed
19