Commit 6d10cf24 authored by Sylvain Schmitz's avatar Sylvain Schmitz

compute median

parent 5907b082
all: dist.dat axis-count.tex size-gte-100.tex matrices xslt.dat xqy.dat coverage-size.tex coverage-axis-step.tex numqueries.tex
all: dist.dat axis-count.tex size-gte-100.tex matrices xslt.dat xqy.dat coverage-size.tex coverage-axis-step.tex numqueries.tex MAXcount.tex
SHELL := /bin/bash
......@@ -24,11 +24,18 @@ miniclean:
rm -f *gnuplottex-fig*.pdf
rm -f *.aux *.gnuploterrors *.log
numqueries: $(wildcard ../../benchmark/*-axis-step.xml)
numqueries: $(wildcard ../../benchmark/*-full.xml)
grep '<ast' `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` | wc -l > $@
numqueries.tex: numqueries
printf "%'.0f" `cat numqueries` > $@
printf "%'.0f" `cat $<` > $@
MAXcount: $(wildcard ../../benchmark/*-full.xml)
grep 'MAX' `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` | wc -l > $@
MAXcount.tex: MAXcount
printf "%'.0f" `cat $<` > $@
size-gte-100.tex: $(wildcard ../../benchmark/*-full.xml)
./size-gte.sh `grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'` > $@
......@@ -36,7 +43,7 @@ size-gte-100.tex: $(wildcard ../../benchmark/*-full.xml)
axis-count.tex: $(wildcard ../../benchmark/*-axis-step.xml)
./axis-count.sh > $@
dist.dat: $(wildcard ../../benchmark/*-full.xml)
dist.dat: numqueries distribution.sh $(wildcard ../../benchmark/*-full.xml)
./distribution.sh 1 > dist.dat
captured_dist.dat: $(wildcard ../../benchmark/*-full.xml)
./captured_distr.sh > captured_dist.dat
......
......@@ -11,6 +11,9 @@ fi
fragments=`grep 'href' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
MAX=`grep 'MAX_AST_SIZE =' ../../src/main/java/fr/lsv/xpparser/XPathEntry.java| sed -e 's/[^0-9]*\([0-9]*\).*/\1/'`
numqueries=`cat numqueries`
half=$((numqueries / 2))
total=0
for ((i = 1; i < $MAX; i+=$step))
do
C=0
......@@ -19,6 +22,12 @@ do
G=`grep "ast depth=.* size=\"$j\"" $fragments | wc -l`
C=$((C + G))
done
echo "$i $C"
total=$((C + total))
if [ "$total" -gt "$half" ]
then
printf "%'.0f" $i > median.tex
half=$numqueries
fi
echo "$i $C $total"
done
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