Merge scores, also for DBC output
[pazpar2-moved-to-github.git] / heikki / solr / run.sh
1 #!/bin/bash
2 #
3 # Run the test with a number of queries, plot the results
4
5
6 if [ "$1" == "" ]
7 then
8   echo "Need an argument, the name of this test run"
9   echo "It will be in the title of all plots, together with the query"
10   exit 1
11 fi
12 (cd ../../src; rm -f pazpar2; make; grep '###' relevance.c )
13 TITLE="$1"
14 OUTFILE=`echo $1.txt | sed 's/ /_/g'`
15 echo "Run $TITLE" > $OUTFILE
16 ./test3.sh clean
17 rm *.png
18
19 function onerun() {
20     QRY="$1"
21     echo "" >> $OUTFILE
22     echo "Query: $QRY" >> $OUTFILE
23     PNG=`echo "$TITLE $QRY.png" | sed 's/ /_/g' `
24     echo "Graph: $PNG" >> $OUTFILE
25     ./test3.sh "$QRY" "$TITLE"
26     cat stat.line >> $OUTFILE
27     grep "plotline" show.out | head -10 >> $OUTFILE
28     cp plot.png $PNG
29 }
30
31 onerun "harry potter"
32 onerun "vietnam war"
33 onerun "water or fire or ice"
34 onerun "zen and motorcycle"
35 echo "" >> $OUTFILE
36 echo "client#, position, tf/idf, roundrobin, solr, normalized # database # title" >> $OUTFILE
37
38 rm plot.png