aboutsummaryrefslogtreecommitdiffstats
path: root/plot_sched
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@bbb1-cs.cs.unc.edu>2008-05-25 00:47:48 -0400
committerBjoern Brandenburg <bbb@bbb1-cs.cs.unc.edu>2008-05-25 00:47:48 -0400
commit48354b21ae13e4a653dba9c0435249ada6997659 (patch)
treeef8ca106d0945506b9cb03bd506fcd9ba2a44a40 /plot_sched
parentb5c15533f5e5b0f7d9f19cfb45db360333b80066 (diff)
make'em pretty!
Diffstat (limited to 'plot_sched')
-rwxr-xr-xplot_sched110
1 files changed, 91 insertions, 19 deletions
diff --git a/plot_sched b/plot_sched
index ee378e5..b955c85 100755
--- a/plot_sched
+++ b/plot_sched
@@ -20,28 +20,99 @@ if [ ! -f "$CSV1" ]; then
20 exit 1 20 exit 1
21fi 21fi
22 22
23KIND=`basename $CSV1 | sed -e 's/^\([^_]*\).*/\1/'` 23HARDSOFT=`basename $CSV1 | sed -e 's/^\([^_]*\).*/\1/'`
24KIND=`basename $CSV1 | sed -e 's/^[^_]*_\([^_]*\).*/\1/'`
25DIST=`basename $CSV1 | sed -e 's/^[^_]*_[^_]*_dist=\(.*\).csv/\1/'`
26
27case "$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 ;;
48esac
49
50echo "Hard/Soft : $HARDSOFT"
51echo "Study : $KIND"
52echo "Distribution: $DIST"
24 53
25case "$KIND" in 54case "$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 ;;
41esac 109esac
42 110
43 111
44BASE=`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` 112XLABEL="utilization cap"
113XRANGE="set xrange [0.5:32.5]; set xtics 0, 2"
114
115BASE=`basename $CSV1 | sed -e s/.csv//g -e s/dist=//g `
45 116
46echo $BASE 117echo $BASE
47 118
@@ -50,18 +121,19 @@ if [ "$OUT" == "" ]; then
50fi 121fi
51 122
52if [ "$TITLE" == "" ]; then 123if [ "$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"
54fi 125fi
55 126
127# fixup csv file, gnuplot is picky
128sed -i -e 's/,\([^ ]\)/, \1/g' $CSV1
129
56gnuplot <<EOM 130gnuplot <<EOM
57set terminal $TERMINAL 131set terminal $TERMINAL
58set out '/dev/null' 132set out '/dev/null'
59set yrange [-0.1:1.1] 133$YRANGE
60plot '$CSV1' using 1:2 title 'P-EDF' with linespoints 134$XRANGE
61replot '$CSV1' using 1:3 title 'C-EDF' with linespoints 135$PLOT
62replot '$CSV1' using 1:4 title 'G-EDF' with linespoints 136set ylabel '$YLABEL'
63replot '$CSV1' using 1:5 title 'PFAIR' with linespoints
64set ylabel 'schedulability'
65set xlabel '$XLABEL' 137set xlabel '$XLABEL'
66set title '$TITLE' 138set title '$TITLE'
67set key below 139set key below