--- /dev/null
+#!/bin/bash
+
+for i in /tmp/test_ORG /tmp/test_ORG.LB_BUF /tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC /tmp/test_ORG.LB_DAG_EMBRIONIC /tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_*[0-9] /tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_10;
+#for i in /tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_10;
+do
+
+ #cat $i | grep 1000| sed 's/(//'| awk 'BEGIN {a=8002}; // {print a " " $8 " " sqrt(500000/a); a=a+16004}' > $i.plot;
+ lines=`cat $i | wc -l| sed 's/ //g'`
+ cat $i | grep 1000| sed 's/(//'| awk -v lines=$lines 'BEGIN {a=500}; // {print a " " $8 " " lines*1000/a; a=a+1000}' > $i.plot;
+# cat $i | grep 1000| sed 's/(//'| awk -v lines=$lines 'BEGIN {a=500}; // {print a " " $8 " " 1; a=a+1000}' > $i.plot;
+
+
+cat <<EOF >/tmp/plot.gp
+f(x) = a*log(x+b) + c
+a=0
+b=1
+c=0
+fit f(x) '$i.plot' using 1:2:3 via a, b, c
+print "f(100000) = ", f(100000)
+EOF
+
+a=`gnuplot /tmp/plot.gp 2>&1| awk '/^a.*=.*%/ {print $3}'`
+b=`gnuplot /tmp/plot.gp 2>&1| awk '/^b.*=.*%/ {print $3}'`
+c=`gnuplot /tmp/plot.gp 2>&1| awk '/^c.*=.*%/ {print $3}'`
+f100000=`gnuplot /tmp/plot.gp 2>&1| awk '/^f\(100000\)/ {print $3}'`
+
+
+cat <<EOF >/tmp/plot_final.gp
+f(x) = a*log(x+b) + c
+a=0
+b=1
+c=0
+fit f(x) "$i.plot" using 1:2:3 via a, b, c
+set xlabel "Number of jobs in DB"
+set ylabel "Millions of registrations per day"
+set title "Megajob challenge performance measurement"
+set out "$i.ps"
+set terminal postscript landscape "Helvetica" 14
+plot '$i.plot', f(x) title "f(x) = a * log(x+b) + c [a=$a b=$b c=$c] ",\
+ f(100000) title "f(100000) = $f100000"
+print f(100000)
+print f(1000000)
+print f(10000000)
+EOF
+
+gnuplot /tmp/plot_final.gp
+
+done
--- /dev/null
+#!/bin/bash
+
+TEST_SCRIPT=/home/mulac/src/ORG/org.glite.lb.client/src/perftest_jobreg.sh
+
+db_clean() {
+ mysql -u lbserver -e "delete from users;" lbserver20_test
+ mysql -u lbserver -e "delete from status_tags;" lbserver20_test
+ mysql -u lbserver -e "delete from states;" lbserver20_test
+ mysql -u lbserver -e "delete from short_fields;" lbserver20_test
+ mysql -u lbserver -e "delete from jobs;" lbserver20_test
+ mysql -u lbserver -e "delete from events;" lbserver20_test
+ mysql -u lbserver -e "delete from server_state;" lbserver20_test
+ mysql -u lbserver -e "delete from notif_registrations;" lbserver20_test
+ mysql -u lbserver -e "delete from notif_jobs;" lbserver20_test
+ mysql -u lbserver -e "delete from long_fields;" lbserver20_test
+ mysql -u lbserver -e "delete from acls;" lbserver20_test
+}
+
+
+#db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+#killall -9 glite-lb-bkserverd
+LB_BUF_BYTES=0
+LB_BUF_LINES=10
+$TEST_SCRIPT 1>>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_10 2>>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_10
+
+exit(0);
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG/stage
+#for i in `seq 1 30`; do $TEST_SCRIPT ; done 2>>/tmp/test_ORG 1>>/tmp/test_ORG
+killall -9 glite-lb-bkserverd
+$TEST_SCRIPT &>/tmp/test_ORG
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF/stage
+#for i in `seq 1 30`; do $TEST_SCRIPT ; done &>/tmp/test_ORG.LB_BUF
+killall -9 glite-lb-bkserverd
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_DAG_EMBRIONIC/stage
+#for i in `seq 1 30`; do $TEST_SCRIPT ; done &>/tmp/test_ORG.LB_DAG_EMBRIONIC
+killall -9 glite-lb-bkserverd
+$TEST_SCRIPT &>/tmp/test_ORG.LB_DAG_EMBRIONIC
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+#for i in `seq 1 30`; do $TEST_SCRIPT; done &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC
+unset LB_BUF_BYTES
+unset LB_BUF_LINES
+killall -9 glite-lb-bkserverd
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+killall -9 glite-lb-bkserverd
+LB_BUF_BYTES=0
+LB_BUF_LINES=5
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_5
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+killall -9 glite-lb-bkserverd
+LB_BUF_BYTES=0
+LB_BUF_LINES=20
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_20
+
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+killall -9 glite-lb-bkserverd
+LB_BUF_BYTES=0
+LB_BUF_LINES=100
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_100
+
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+killall -9 glite-lb-bkserverd
+LB_BUF_BYTES=0
+LB_BUF_LINES=500
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_500
+
+
+db_clean;
+GLITE_LOCATION=/home/mulac/src/ORG.LB_BUF_LB_DAG_EMBRIONIC/stage
+killall -9 glite-lb-bkserverd
+LB_BUF_BYTES=0
+LB_BUF_LINES=100
+$TEST_SCRIPT &>/tmp/test_ORG.LB_BUF_LB_DAG_EMBRIONIC_1000
+
+
+exit 0;
+