Commit 247e3418 authored by Sylvain Schmitz's avatar Sylvain Schmitz

compute best/worst coverages

parent e2f96d71
......@@ -63,10 +63,10 @@ xquery-orig.cov: coverage.sh full-frags.sh ../../relaxng/fragments-full.xml
./coverage.sh xquery "`./full-frags.sh ../../relaxng/fragments-orig.xml`" > xquery-orig.cov
xslt.dat: bench.sh xslt-full.cov xslt-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
./bench.sh xslt-full.cov xslt-orig.cov `grep 'type="xslt"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > xslt.dat
./bench.sh xslt-full.cov xslt-orig.cov `grep 'type="xslt"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > xslt.dat 2> minmax-xslt.tex
xqy.dat: bench.sh xquery-full.cov xquery-orig.cov $(wildcard ../../benchmark/*-full.xml) benchmarks-all-full.xml
./bench.sh xquery-full.cov xquery-orig.cov `grep 'type="xquery"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > xqy.dat
./bench.sh xquery-full.cov xquery-orig.cov `grep 'type="xquery"' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > xqy.dat 2> minmax-xqy.tex
test.pdf: xslt.dat xqy.dat test.tex
pdflatex --shell-escape test.tex
......
......@@ -18,9 +18,13 @@ variants=( "extra" "full" "orig" )
# the coverage of XPath 3.0
total=`grep 'xpath-3.0.rnc.*yes' $files | wc -l`
max=0
maxf=0
min=$total
minf=0
# main loop on every fragment
for ((f=0; f<${#fragments[@]}; ++f))
do
do
fname=`echo ${names[f]} | sed 's/~/ /'`
printf "\"\\\\\\\textsf{$fname}\"\t" # the fragment's name
if [ ${#fname} -lt 7 ]
......@@ -48,10 +52,29 @@ do
count=`grep $name.*yes $files | wc -l`
percent=`echo "scale=2; 100*$count/$total" | bc`
printf "$percent\t"
# update min/max
if [ $v -eq 1 ]
then
if [ $min -gt $count ] && [ "${names[f]}" != "Downward" ] && [ "${names[f]}" != "Forward" ]
then
min=$count
minf=$f
fi
if [ $max -lt $count ]
then
max=$count
maxf=$f
fi
fi
done
echo
done
minpercent=`echo "scale=2; 100*$min/$total" | bc`
maxpercent=`echo "scale=2; 100*$max/$total" | bc`
printf "$minpercent\\\\%% for \\\\textsf{${names[minf]}\\\\-XPath} and " >&2
printf "$maxpercent\\\\%% for \\\\textsf{${names[maxf]}\\\\-XPath}" >&2
# printf '"\\\\textit{Combined}"'
# printf "\t0\t"
# percent=`echo "scale=2; 100*$coverage_full/$total" | 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