3 SET_TERM_TEMPLATE='set term push; set term x11 enhanced; set term wxt enhanced; set term pop'
7 while getopts d:esp opt
10 d) DELAY_BOUND="[0:$OPTARG]";;
11 e) SET_TERM_TEMPLATE='set term postscript color eps enhanced; set output "${FILE}.eps"';;
12 s) SET_TERM_TEMPLATE='set term svg enhanced; set output "${FILE}.svg"';;
14 SET_TERM_TEMPLATE='set term postscript color landscape enhanced'
18 SET_TERM_TEMPLATE='set term postscript color landscape enhanced'
20 GNUPLOT_CMD_FILE=plot_commands.$$
21 rm -f ${GNUPLOT_CMD_FILE}
26 shift $(($OPTIND - 1))
28 [ $# -eq 0 -a -r delay_stats.dat ] && set delay_stats.dat
33 FILE=`basename "$1" .dat`
36 COMMAND="Results of: $(grep 'Invoked as' ${FILE}.dat|grep -o 'wclient.*'|sed -e 's/ -o [^ ]*//' -e 's/ [^ ]* ?$//')"
37 STREAMS="$(grep -o 'Stream.*' ${FILE}.dat|sort|while read LINE; do echo {/*0.7 $LINE}\\n; done|tr -d '\n'|sed -e 's/_/\\\\_/g')"
39 TITLE="${COMMAND}\n\n${STREAMS}"
41 SET_TERM=$(echo $SET_TERM_TEMPLATE|sed -e s/\${FILE}/$FILE/)
42 if [ -n "$SINGLE_PDF" ]; then
43 CMD="cat >>$GNUPLOT_CMD_FILE"
44 elif [ -n "$PDF_OUTPUT" ]; then
45 CMD="cat | gnuplot | ps2pdf - ${FILE}.pdf"
47 CMD="cat | gnuplot -persist"
51 set xlabel "Delay [ms]"
52 set ylabel "Cumulative % of packets"
54 set key right bottom nobox
55 set style data linespoints
58 "${FILE}.dat" index 0 title "AC\\\\_VO",\
59 "${FILE}.dat" index 1 title "AC\\\\_VI",\
60 "${FILE}.dat" index 2 title "AC\\\\_BE",\
61 "${FILE}.dat" index 3 title "AC\\\\_BK"
65 if [ -n "$SINGLE_PDF" ]; then
66 gnuplot $GNUPLOT_CMD_FILE|ps2pdf - all.pdf
67 rm -f $GNUPLOT_CMD_FILE