Real/User/Sys report from zebraidx
[idzebra-moved-to-github.git] / test / dmoz / update.sh
1 #!/bin/sh
2 # $Id: update.sh,v 1.4 2002-06-19 11:37:11 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 cat >plot.dem <<ENDOFMESSAGE
22 set xlabel "runs"
23 set ylabel "seconds"
24 plot [0:] [0:] \
25         'times-$t.log' using 2 title 'ISAM-$t(real)' with linespoints, \
26         'times-$t.log' using 3 title 'ISAM-$t(user)' with linespoints, \
27         'times-$t.log' using 4 title 'ISAM-$t(sys)' with linespoints
28 set output "times-$t.ps"
29 set terminal postscript
30 replot
31 ENDOFMESSAGE
32
33 gnuplot plot.dem
34
35