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