X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=heikki%2Fsolr%2Ftest3.sh;fp=heikki%2Fsolr%2Ftest3.sh;h=f1176350297ecb065da42a79956a1a8b754d3b2f;hb=a425a433260c0f07b69ce6ca9d1fde9b496e8999;hp=649c79c36519a3cb3aac9c456150d7da1ee988ec;hpb=4e7c5a2a359970dddb74662257b9946044d525a0;p=pazpar2-moved-to-github.git diff --git a/heikki/solr/test3.sh b/heikki/solr/test3.sh index 649c79c..f117635 100755 --- a/heikki/solr/test3.sh +++ b/heikki/solr/test3.sh @@ -97,7 +97,23 @@ echo "Client numbers" cat scores.data | cut -d' ' -f2 | sort -u head -10 scores.data -exit 1 +grep mergeplot show.out > merge.tmp +LINENUMBER="1" +LAST="" +echo "0 0 0" > merge.data +for lno in `cat merge.tmp | cut -d ' ' -f2` +do + if [ "$lno" != "$LAST" ] + then + echo "Found line $lno at $LINENUMBER" + grep "mergeplot $lno " merge.tmp | sed "s/mergeplot/$LINENUMBER/" >> merge.data + LAST=$lno + LINENUMBER=$(($LINENUMBER + 1)) + fi +done +echo "$LINENUMBER 0 0 0" >> merge.data + +#exit 1 T1=`grep ": 1 " scores.data | head -1 | cut -d'#' -f2 | cut -d' ' -f2` T2=`grep ": 2 " scores.data | head -1 | cut -d'#' -f2 | cut -d' ' -f2` @@ -119,6 +135,16 @@ echo " " > plot.cmd cat plot.cmd | gnuplot +echo " + set term png + set out \"cluster.png\" + set title \"$HEADLINE\" + plot \"merge.data\" using 1:3 with points title \"records\", \ + \"merge.data\" using 1:4 with points title \"merged score\", \ + \"merge.data\" using 1:5 with points title \"sum score\", \ + \"merge.data\" using 1:6 with points title \"avg score\" +" > plot.cmd +cat plot.cmd | gnuplot echo "All done"