Commit cb2d41d5 authored by Sylvain Schmitz's avatar Sylvain Schmitz

improve readability

parent 6bbc6058
...@@ -31,7 +31,7 @@ do ...@@ -31,7 +31,7 @@ do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[(ast//xqx:xpathAxis)])" $file` count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[(ast//xqx:xpathAxis)])" $file`
total=$((count + total)) total=$((count + total))
done done
percent=`echo "scale=2; 100*$value/$total" | bc` percent=`echo "scale=1; 100*$value/$total" | bc`
printf "& $percent\\%% " printf "& $percent\\%% "
# no axis step # no axis step
...@@ -47,7 +47,7 @@ do ...@@ -47,7 +47,7 @@ do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[not(ast//xqx:xpathAxis)])" $file` count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[not(ast//xqx:xpathAxis)])" $file`
total=$((count + total)) total=$((count + total))
done done
percent=`echo "scale=2; 100*$value/$total" | bc` percent=`echo "scale=1; 100*$value/$total" | bc`
printf "& $percent\\%%" printf "& $percent\\%%"
printf '\\\\\n' printf '\\\\\n'
printf '\\bottomrule\n' printf '\\bottomrule\n'
......
...@@ -43,7 +43,7 @@ do ...@@ -43,7 +43,7 @@ do
value=$((count + value)) value=$((count + value))
done done
array[$i]=$value array[$i]=$value
printf "& ${array[i]} " printf "& %'.0f " ${array[i]}
done done
value=0 value=0
for file in $@ for file in $@
...@@ -52,7 +52,7 @@ do ...@@ -52,7 +52,7 @@ do
value=$((count + value)) value=$((count + value))
done done
array[$i]=$value array[$i]=$value
printf "& $value" printf "& %'.0f" $value
printf '\\\\\n' printf '\\\\\n'
# first row: accepted # first row: accepted
...@@ -65,7 +65,7 @@ do ...@@ -65,7 +65,7 @@ do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[(ast[@size >= $i and @size < ($i+$step)]) and (schemas/validation[($full) and @valid=\"yes\"])])" $file` count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[(ast[@size >= $i and @size < ($i+$step)]) and (schemas/validation[($full) and @valid=\"yes\"])])" $file`
value=$((count + value)) value=$((count + value))
done done
percent=`echo "scale=2; 100*$value/${array[i]}" | bc` percent=`echo "scale=1; 100*$value/${array[i]}" | bc`
printf "& $percent\\%% " printf "& $percent\\%% "
done done
value=0 value=0
...@@ -74,7 +74,7 @@ do ...@@ -74,7 +74,7 @@ do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[(ast[@size >= $i]) and (schemas/validation[($full) and @valid=\"yes\"])])" $file` count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[(ast[@size >= $i]) and (schemas/validation[($full) and @valid=\"yes\"])])" $file`
value=$((count + value)) value=$((count + value))
done done
percent=`echo "scale=2; 100*$value/${array[i]}" | bc` percent=`echo "scale=1; 100*$value/${array[i]}" | bc`
printf "& $percent\\%% " printf "& $percent\\%% "
printf '\\\\\n' printf '\\\\\n'
printf '\\bottomrule\n' printf '\\bottomrule\n'
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
10cm,6.0cm}] 10cm,6.0cm}]
set yrange [0:100] set yrange [0:100]
set decimal locale set decimal locale
set format y "%'g" set format y '%.0f\%%'
set style fill solid 1 border rgb "#ffffff" set style fill solid 1 border rgb "#ffffff"
set ylabel "percentage of queries" set ylabel "percentage of queries"
set xtics nomirror rotate by -45 set xtics nomirror rotate by -45
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
10cm,6.0cm}] 10cm,6.0cm}]
set yrange [0:100] set yrange [0:100]
set decimal locale set decimal locale
set format y "%'g" set format y '%.0f\%%'
set style fill solid 1.00 border rgb "#ffffff" set style fill solid 1.00 border rgb "#ffffff"
set ylabel "percentage of queries" set ylabel "percentage of queries"
set xtics nomirror rotate by -45 set xtics nomirror rotate by -45
......
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