aboutsummaryrefslogtreecommitdiffstats
path: root/plot_sched
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2009-02-22 00:41:36 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2009-02-22 00:41:36 -0500
commitbe610af3ec405f0dbaa4eec3bf94905268b8b392 (patch)
treea1cbe6dc1fe12cfce68254d1a969e4ff5df8cc36 /plot_sched
parent65fa321d63cfd3a38309b7ec8907df5c4a8d26b6 (diff)
remove old bash cruft
Diffstat (limited to 'plot_sched')
-rwxr-xr-xplot_sched178
1 files changed, 0 insertions, 178 deletions
diff --git a/plot_sched b/plot_sched
deleted file mode 100755
index 1d1614c..0000000
--- a/plot_sched
+++ /dev/null
@@ -1,178 +0,0 @@
1#!/bin/bash
2
3#NICE="blacktext linewidth 4.0 \"Helvetica\" 16 "
4
5# try thinner lines
6NICE="blacktext linewidth 1.0 \"Helvetica\" 16 "
7
8if [ "$1" == "--eps" ]; then
9 EXT="eps"
10# TERMINAL="postscript eps color $NICE"
11 TERMINAL="postscript eps $NICE"
12 shift
13else
14 EXT="png"
15 TERMINAL="png picsize 1024 768"
16fi
17
18CSV1=$1
19TITLE=$2
20OUT=$3
21
22if [ ! -f "$CSV1" ]; then
23 echo "Usage: plot_sched <data.csv> [<title>] [<out.png>]"
24 exit 1
25fi
26
27HARDSOFT=`basename $CSV1 | sed -e 's/^\([^_]*\).*/\1/'`
28KIND=`basename $CSV1 | sed -e 's/^[^_]*_\([^_]*\).*/\1/'`
29FDIST=`basename $CSV1 | sed -e 's/^[^_]*_[^_]*_dist=\(.*\).csv/\1/'`
30
31case "$FDIST" in
32 uni_light)
33 DIST="uniformly distributed in [0.001, 0.1]"
34 ;;
35 uni_medium)
36 DIST="uniformly distributed in [0.1, 0.4]"
37 ;;
38 uni_heavy)
39 DIST="uniformly distributed in [0.5, 0.9]"
40 ;;
41 bimo_light)
42 DIST="bimodally distributed in [0.001, 0.5] (8/9) and [0.5, 0.9] (1/9)"
43 ;;
44 bimo_medium)
45 DIST="bimodally distributed in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)"
46 ;;
47 bimo_heavy)
48 DIST="bimodally distributed in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)"
49 ;;
50 *)
51 ;;
52esac
53
54echo "Hard/Soft : $HARDSOFT"
55echo "Study : $KIND"
56echo "Distribution: $DIST"
57
58XLABEL="utilization cap"
59XRANGE="set xrange [0.5:32.5]; set xtics 0, 2"
60
61STYLE="lines lw 3"
62#STYLE=linespoints
63
64
65LINESTYLE=" \
66 set style line 1 lt rgb 'blue'; \
67 set style line 2 lt rgb 'orange-red'; \
68"
69
70case "$KIND" in
71 sched)
72 YLABEL="schedulability"
73 YRANGE="set yrange [-0.1:1.1]"
74 case "$HARDSOFT" in
75 soft)
76 PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \
77 '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \
78 '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \
79 '$CSV1' using 1:5 title 'PFAIR' with $STYLE, \
80 '$CSV1' using 1:6 title 'S-PFAIR' with $STYLE, \
81 '$CSV1' using 1:7 title 'G-NP-EDF' with $STYLE
82 "
83 if [ "$FDIST" != "uni_light" ]; then
84 XRANGE="set xrange [21.5:32.5]; set xtics 0, 2"
85 fi
86 ;;
87 hard)
88 PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \
89 '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \
90 '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \
91 '$CSV1' using 1:5 title 'PFAIR' with $STYLE, \
92 '$CSV1' using 1:6 title 'S-PFAIR' with $STYLE
93 "
94 ;;
95 esac
96 ;;
97 tard)
98 YLABEL="tardiness (in ms)"
99 YRANGE=
100 PLOT="plot '$CSV1' using 1:2 title 'C-EDF' with $STYLE, \
101 '$CSV1' using 1:3 title 'G-EDF' with $STYLE, \
102 '$CSV1' using 1:4 title 'G-NP-EDF' with $STYLE
103 "
104 ;;
105 util)
106 YLABEL="utilization (incl. overheads)"
107 YRANGE=
108 case "$HARDSOFT" in
109 soft)
110 PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \
111 '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \
112 '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \
113 '$CSV1' using 1:5 title 'PFAIR' with $STYLE, \
114 '$CSV1' using 1:6 title 'G-NP-EDF' with $STYLE
115 "
116 ;;
117 hard)
118 PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \
119 '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \
120 '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \
121 '$CSV1' using 1:5 title 'PFAIR' with $STYLE \
122 "
123 ;;
124 esac
125 ;;
126 gedf)
127 YLABEL="schedulability"
128 YRANGE="set yrange [-0.1:1.1]"
129 PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \
130 '$CSV1' using 1:8 title 'G-EDF (all)' with $STYLE, \
131 '$CSV1' using 1:3 title 'G-EDF [GFB03]' with $STYLE, \
132 '$CSV1' using 1:4 title 'G-EDF [BAK03]' with $STYLE, \
133 '$CSV1' using 1:5 title 'G-EDF [BCL05]' with $STYLE, \
134 '$CSV1' using 1:6 title 'G-EDF [BCL08]' with $STYLE, \
135 '$CSV1' using 1:7 title 'G-EDF [SKB07]' with $STYLE \
136 "
137 ;;
138 *)
139 YLABEL=""
140 YRANGE=""
141 ;;
142esac
143
144BASE=`basename $CSV1 | sed -e s/.csv//g -e s/dist=//g `
145
146#echo $BASE
147
148if [ "$OUT" == "" ]; then
149 OUT="${BASE}.${EXT}"
150fi
151
152if [ "$TITLE" == "" ]; then
153 TITLE="$DIST"
154fi
155
156# fixup csv file, gnuplot is picky
157sed -i -e 's/,\([^ ]\)/, \1/g' $CSV1
158
159gnuplot <<EOM
160set terminal $TERMINAL
161set out '/dev/null'
162$YRANGE
163$XRANGE
164$PLOT
165set ylabel '$YLABEL'
166set xlabel '$XLABEL'
167set title '$TITLE'
168set key below
169#set data style $STYLE
170set out '$OUT'
171set palette defined ( 0 "blue", 3 "green", 6 "yellow", 10 "red" )
172replot
173set out
174EOM
175
176if [ "$EXT" == "eps" ]; then
177 ps2pdf -dEPSCrop $OUT
178fi