diff options
Diffstat (limited to 'plot_sched')
| -rwxr-xr-x | plot_sched | 110 |
1 files changed, 91 insertions, 19 deletions
| @@ -20,28 +20,99 @@ if [ ! -f "$CSV1" ]; then | |||
| 20 | exit 1 | 20 | exit 1 |
| 21 | fi | 21 | fi |
| 22 | 22 | ||
| 23 | KIND=`basename $CSV1 | sed -e 's/^\([^_]*\).*/\1/'` | 23 | HARDSOFT=`basename $CSV1 | sed -e 's/^\([^_]*\).*/\1/'` |
| 24 | KIND=`basename $CSV1 | sed -e 's/^[^_]*_\([^_]*\).*/\1/'` | ||
| 25 | DIST=`basename $CSV1 | sed -e 's/^[^_]*_[^_]*_dist=\(.*\).csv/\1/'` | ||
| 26 | |||
| 27 | case "$DIST" in | ||
| 28 | uni_light) | ||
| 29 | DIST="uniformly distributed in [0.001, 0.1]" | ||
| 30 | ;; | ||
| 31 | uni_medium) | ||
| 32 | DIST="uniformly distributed in [0.1, 0.4]" | ||
| 33 | ;; | ||
| 34 | uni_heavy) | ||
| 35 | DIST="uniformly distributed in [0.5, 0.9]" | ||
| 36 | ;; | ||
| 37 | bimo_light) | ||
| 38 | DIST="bimodally distributed in [0.001, 0.5] (8/9) and [0.5, 0.9] (1/9)" | ||
| 39 | ;; | ||
| 40 | bimo_medium) | ||
| 41 | DIST="bimodally distributed in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)" | ||
| 42 | ;; | ||
| 43 | bimo_heavy) | ||
| 44 | DIST="bimodally distributed in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)" | ||
| 45 | ;; | ||
| 46 | *) | ||
| 47 | ;; | ||
| 48 | esac | ||
| 49 | |||
| 50 | echo "Hard/Soft : $HARDSOFT" | ||
| 51 | echo "Study : $KIND" | ||
| 52 | echo "Distribution: $DIST" | ||
| 24 | 53 | ||
| 25 | case "$KIND" in | 54 | case "$KIND" in |
| 26 | util) | 55 | sched) |
| 27 | XLABEL="utilization cap" | 56 | YLABEL="schedulability" |
| 57 | YRANGE="set yrange [-0.1:1.1]" | ||
| 58 | case "$HARDSOFT" in | ||
| 59 | soft) | ||
| 60 | PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with linespoints, \ | ||
| 61 | '$CSV1' using 1:3 title 'C-EDF' with linespoints, \ | ||
| 62 | '$CSV1' using 1:4 title 'G-EDF' with linespoints, \ | ||
| 63 | '$CSV1' using 1:5 title 'PFAIR' with linespoints, \ | ||
| 64 | '$CSV1' using 1:6 title 'G-NP-EDF' with linespoints | ||
| 65 | " | ||
| 66 | ;; | ||
| 67 | hard) | ||
| 68 | PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with linespoints, \ | ||
| 69 | '$CSV1' using 1:3 title 'C-EDF' with linespoints, \ | ||
| 70 | '$CSV1' using 1:4 title 'G-EDF' with linespoints, \ | ||
| 71 | '$CSV1' using 1:5 title 'PFAIR' with linespoints \ | ||
| 72 | " | ||
| 73 | ;; | ||
| 74 | esac | ||
| 28 | ;; | 75 | ;; |
| 29 | freq) | 76 | tard) |
| 30 | XLABEL="K" | 77 | YLABEL="tardiness (in ms)" |
| 78 | YRANGE= | ||
| 79 | PLOT="plot '$CSV1' using 1:2 title 'C-EDF' with linespoints, \ | ||
| 80 | '$CSV1' using 1:3 title 'G-EDF' with linespoints, \ | ||
| 81 | '$CSV1' using 1:4 title 'G-NP-EDF' with linespoints | ||
| 82 | " | ||
| 31 | ;; | 83 | ;; |
| 32 | mcsl) | 84 | util) |
| 33 | XLABEL="L (in us)" | 85 | YLABEL="utilization (incl. overheads)" |
| 34 | ;; | 86 | YRANGE= |
| 35 | cpus) | 87 | case "$HARDSOFT" in |
| 36 | XLABEL="processor count" | 88 | soft) |
| 89 | PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with linespoints, \ | ||
| 90 | '$CSV1' using 1:3 title 'C-EDF' with linespoints, \ | ||
| 91 | '$CSV1' using 1:4 title 'G-EDF' with linespoints, \ | ||
| 92 | '$CSV1' using 1:5 title 'PFAIR' with linespoints, \ | ||
| 93 | '$CSV1' using 1:6 title 'G-NP-EDF' with linespoints | ||
| 94 | " | ||
| 95 | ;; | ||
| 96 | hard) | ||
| 97 | PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with linespoints, \ | ||
| 98 | '$CSV1' using 1:3 title 'C-EDF' with linespoints, \ | ||
| 99 | '$CSV1' using 1:4 title 'G-EDF' with linespoints, \ | ||
| 100 | '$CSV1' using 1:5 title 'PFAIR' with linespoints \ | ||
| 101 | " | ||
| 102 | ;; | ||
| 103 | esac | ||
| 37 | ;; | 104 | ;; |
| 38 | *) | 105 | *) |
| 39 | XLABEL=""; | 106 | YLABEL="" |
| 107 | YRANGE="" | ||
| 40 | ;; | 108 | ;; |
| 41 | esac | 109 | esac |
| 42 | 110 | ||
| 43 | 111 | ||
| 44 | BASE=`basename $CSV1 | sed -e s/.csv//g -e s/_[a-z]*=0.123000//g -e 's/\([0-9]*\.[^0]\+\)0*\([_c]\)/\1_\2/g' -e 's/\([0-9]\)\.0*\([_c]\)/\1_\2/g' -e s/_cpus=16//g -e s/_freq=0//g` | 112 | XLABEL="utilization cap" |
| 113 | XRANGE="set xrange [0.5:32.5]; set xtics 0, 2" | ||
| 114 | |||
| 115 | BASE=`basename $CSV1 | sed -e s/.csv//g -e s/dist=//g ` | ||
| 45 | 116 | ||
| 46 | echo $BASE | 117 | echo $BASE |
| 47 | 118 | ||
| @@ -50,18 +121,19 @@ if [ "$OUT" == "" ]; then | |||
| 50 | fi | 121 | fi |
| 51 | 122 | ||
| 52 | if [ "$TITLE" == "" ]; then | 123 | if [ "$TITLE" == "" ]; then |
| 53 | TITLE=`echo -n $BASE | tr '_' ' ' | sed -e 's/^\(util\|freq\|mcsl\|cpus\) //g' -e s/freq=/K=/g -e s/mcsl=/L=/g ` | 124 | TITLE="$DIST" |
| 54 | fi | 125 | fi |
| 55 | 126 | ||
| 127 | # fixup csv file, gnuplot is picky | ||
| 128 | sed -i -e 's/,\([^ ]\)/, \1/g' $CSV1 | ||
| 129 | |||
| 56 | gnuplot <<EOM | 130 | gnuplot <<EOM |
| 57 | set terminal $TERMINAL | 131 | set terminal $TERMINAL |
| 58 | set out '/dev/null' | 132 | set out '/dev/null' |
| 59 | set yrange [-0.1:1.1] | 133 | $YRANGE |
| 60 | plot '$CSV1' using 1:2 title 'P-EDF' with linespoints | 134 | $XRANGE |
| 61 | replot '$CSV1' using 1:3 title 'C-EDF' with linespoints | 135 | $PLOT |
| 62 | replot '$CSV1' using 1:4 title 'G-EDF' with linespoints | 136 | set ylabel '$YLABEL' |
| 63 | replot '$CSV1' using 1:5 title 'PFAIR' with linespoints | ||
| 64 | set ylabel 'schedulability' | ||
| 65 | set xlabel '$XLABEL' | 137 | set xlabel '$XLABEL' |
| 66 | set title '$TITLE' | 138 | set title '$TITLE' |
| 67 | set key below | 139 | set key below |
