Commit ca075dbb authored by neverlord's avatar neverlord

benchmarking

parent 874b8980
set terminal png
set output "graph.png"
unset log
unset label
set xtic auto
set ytic auto
set xlabel "# messages (in 1,000,000)"
set ylabel "time (s)"
set format y "%8.2f"
plot \
"blocking_sutter_list.dat" using 1:2:3 title 'blocking sutter_list' lt 5 with errorbars, \
"blocking_sutter_list.dat" notitle lt 5 with lines, \
"sutter_list.dat" using 1:2:3 title 'polling sutter_list' lt 3 with errorbars, \
"sutter_list.dat" notitle lt 3 with lines, \
"blocking_cached_stack.dat" using 1:2:3 title 'blocking cached_stack' lt 4 with errorbars, \
"blocking_cached_stack.dat" notitle lt 4 with lines, \
"cached_stack.dat" using 1:2:3 title 'polling cached_stack' lt 2 with errorbars, \
"cached_stack.dat" notitle lt 2 with lines
quit
#!/bin/bash
for list in cached_stack blocking_cached_stack sutter_list blocking_sutter_list ; do
echo "benchmarking $list..."
rm -f "$list.dat"
for i in 1000000 2000000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000 ; do
_1=$(./queue_test $i 4 $list "\$TIME")
_2=$(./queue_test $i 4 $list "\$TIME")
_3=$(./queue_test $i 4 $list "\$TIME")
_4=$(./queue_test $i 4 $list "\$TIME")
_5=$(./queue_test $i 4 $list "\$TIME")
MID=$(echo "scale=50;($_1+$_2+$_3+$_4+$_5)/5" | bc)
MAX=$(echo "define max (x, y) { if (x < y) return (y); return (x); }; max(max(max(max($_1,$_2),$_3),$_4),$_5)" | bc)
MIN=$(echo "define min (x, y) { if (x < y) return (x); return (y); }; min(min(min(min($_1,$_2),$_3),$_4),$_5)" | bc)
POS_ERR=$(echo "$MAX-$MID" | bc)
NEG_ERR=$(echo "$MID-$MIN" | bc)
echo $[$i/1000000] $MID $POS_ERR $NEG_ERR >> "$list.dat"
done
done
echo "done"
gnuplot gnuplot_file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment