Changeset: 33a86eff66a2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=33a86eff66a2
Modified Files:
Branch: Oct2010
Log Message:
Merge heads.
diffs (40 lines):
diff -r 06515c962e20 -r 33a86eff66a2 sql/src/test/concurrent-stress.sh
--- a/sql/src/test/concurrent-stress.sh Wed Oct 27 13:53:33 2010 +0200
+++ b/sql/src/test/concurrent-stress.sh Wed Oct 27 14:00:59 2010 +0200
@@ -48,13 +48,35 @@
concurrent_runner() {
local num=$1
local cnt=1
+ local now=$SECONDS
+ local lcnt=0
+ local elapse=
+ local t=
while mclient $MDATABASE $MHOST $MPORT -ftab -s "SELECT 1;" > /dev/null
; do
: $((cnt++))
+ elapse=$((SECONDS - now))
+ if [[ ${elapse} -ge 3 ]] ; then
+ t=$((cnt - lcnt))
+ t=$((t * 100))
+ t=$((t / elapse))
+ echo "mclient $num executed query $cnt, current speed:
${t%??}.${t#${t%??}}q/s"
+ lcnt=${cnt}
+ now=$SECONDS
+ fi
done
echo "mclient $num terminated in query $cnt"
}
+FORKS=
for nr in $(seq 1 $CONCURRENCY) ; do
concurrent_runner $nr &
+ FORKS+=" $!"
done
-wait
+
+cleanup() {
+ kill $FORKS
+}
+trap cleanup TERM INT QUIT
+
+# wait for all children to end
+wait $FORKS
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list