Commit b1b74104 authored by Anthony LICK's avatar Anthony LICK

Add core-2.0-join numbers

parent 874385be
#!/bin/bash
fragment='xpath-2.0-core-join.rnc'
xslt=`grep 'xslt' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
xquery=`grep 'xquery' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
printf '\\begin{tabular}{lrrrr}\n'
printf '\\begin{tabular}{lrrrrr}\n'
printf '\\toprule\n'
printf 'Source & queries & XPath\\,1.0 & XPath\\,2.0 & XPath\,3.0\\\\\n'
printf 'Source & queries & XPath\\,1.0 & XPath\\,2.0 & XPath\,3.0 & \\textsf{CoreXPath~2.0}\\,extended\\\\\n'
printf '\\midrule\n'
# XSLT files
......@@ -24,6 +26,9 @@ do
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
done
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[schemas/validation[@schema=\"$fragment\" and @valid=\"yes\"]])" $file`
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
printf '\\\\\n'
printf "{\\\\tiny \\\\url{$url}} & & & & \\\\\\\\\n"
done
......@@ -46,6 +51,15 @@ do
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
done
count=0
for file in $xslt
do
c=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[schemas/validation[@schema=\"$fragment\" and @valid=\"yes\"]])" $file`
count=$((count+c))
done
counts[4]=$count
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
printf '\\\\\n'
printf '\\midrule\n'
......@@ -67,6 +81,9 @@ do
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
done
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[schemas/validation[@schema=\"$fragment\" and @valid=\"yes\"]])" $file`
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
printf '\\\\\n'
printf "{\\\\tiny \\\\url{$url}} & & & & \\\\\\\\\n"
done
......@@ -89,13 +106,22 @@ do
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
done
count=0
for file in $xquery
do
c=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[schemas/validation[@schema=\"$fragment\" and @valid=\"yes\"]])" $file`
count=$((count+c))
done
counts[4]=$((count + counts[i]))
percent=`echo "scale=1; 100*$count/$n" | bc`
printf "& $percent\\\\%% "
printf '\\\\\n'
N=$((N + n))
printf '\\midrule\n'
printf 'Total '
printf "& %'.0f " $N
for ((i=1; i < 4; ++i))
for ((i=1; i < 5; ++i))
do
count=${counts[i]}
percent=`echo "scale=1; 100*$count/$N" | bc`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment