e99e2bb2b5231abbd7972c4fd468d83a79e2d3e9
[idzebra-moved-to-github.git] / test / dmoz / update.sh
1 #!/bin/sh
2 # $Id: update.sh,v 1.3 2002-06-19 10:29:18 adam Exp $
3 t=$1
4 test -n "$t" || exit 1
5 rm -f *.mf *.LCK *.tmp
6 ../../index/zebraidx -l zebraidx.log init 
7 i=0
8 rm -f times-$t.log zebraidx-$t.log stat-$t.log
9 while test -f dmoz.$i.xml; do
10         echo -n "$i " >>times-$1.log
11         /usr/bin/time -f '%e %U %S %P' -a -o times-$t.log ../../index/zebraidx -l zebraidx-$t.log -c zebra-$t.cfg -f 10 update dmoz.$i.xml 
12         ../../index/zebraidx -l zebraidx-$t.log -c zebra-$t.cfg stat >>stat-$t.log 
13         i=`expr $i + 1`
14         if test $i = 30; then
15                 break
16         fi
17 done
18
19 cat >plot.dem <<ENDOFMESSAGE
20 set xlabel "runs"
21 set ylabel "seconds"
22 plot [0:] [0:] \
23         'times-$t.log' using 2 title 'ISAM-$t(real)' with linespoints, \
24         'times-$t.log' using 3 title 'ISAM-$t(user)' with linespoints, \
25         'times-$t.log' using 4 title 'ISAM-$t(sys)' with linespoints
26 set output "times-$t.ps"
27 set terminal postscript
28 replot
29 ENDOFMESSAGE
30
31 gnuplot plot.dem
32
33