diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-02-22 00:41:36 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-02-22 00:41:36 -0500 |
commit | be610af3ec405f0dbaa4eec3bf94905268b8b392 (patch) | |
tree | a1cbe6dc1fe12cfce68254d1a969e4ff5df8cc36 /plot_ecrts | |
parent | 65fa321d63cfd3a38309b7ec8907df5c4a8d26b6 (diff) |
remove old bash cruft
Diffstat (limited to 'plot_ecrts')
-rwxr-xr-x | plot_ecrts | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/plot_ecrts b/plot_ecrts deleted file mode 100755 index fd76b22..0000000 --- a/plot_ecrts +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | |||
4 | EPS_FLAG= | ||
5 | |||
6 | while true; do | ||
7 | case $1 in | ||
8 | --eps) | ||
9 | shift | ||
10 | EPS_FLAG="--eps" | ||
11 | ;; | ||
12 | *) | ||
13 | break | ||
14 | ;; | ||
15 | esac | ||
16 | done | ||
17 | |||
18 | PLOTTER="plot_scatter $EPS_FLAG --lines " | ||
19 | |||
20 | function get_tmp_file { | ||
21 | OS=`uname` | ||
22 | if [ $OS == "Linux" ] | ||
23 | then | ||
24 | mktemp | ||
25 | else # Darwin | ||
26 | mktemp -t ecrts | ||
27 | fi | ||
28 | } | ||
29 | |||
30 | function get_val { | ||
31 | echo "$1" | sed 's/.*=//g' | ||
32 | } | ||
33 | |||
34 | function plot_file { | ||
35 | SCHED="G-EDF" | ||
36 | FILE=$1 | ||
37 | NAME=`basename $FILE | sed -e 's/.csv//g'` | ||
38 | STRIPPED=`get_tmp_file` | ||
39 | # remove comments for Gnuplot | ||
40 | egrep -v '^#' $FILE > $STRIPPED | ||
41 | if [ ! -s $STRIPPED ] | ||
42 | then | ||
43 | echo "Skipping $FILE since there wasn't any data to be found. " | ||
44 | return | ||
45 | fi | ||
46 | # decode file name | ||
47 | PARAMS= | ||
48 | for KV in `echo $NAME | sed -e 's/_/ /g'` | ||
49 | do | ||
50 | case $KV in | ||
51 | pedf) | ||
52 | SCHED="P-EDF" | ||
53 | ;; | ||
54 | gedf) | ||
55 | SCHED="G-EDF" | ||
56 | ;; | ||
57 | hard) | ||
58 | TEST="hard" | ||
59 | ;; | ||
60 | soft) | ||
61 | TEST="soft" | ||
62 | ;; | ||
63 | axis*) | ||
64 | AXIS=`get_val $KV` | ||
65 | ;; | ||
66 | rmax*|rmin*|wmax*|wmin*) | ||
67 | # ignored, not shown | ||
68 | ;; | ||
69 | *) | ||
70 | PARAMS="$PARAMS $KV" | ||
71 | ;; | ||
72 | esac | ||
73 | done | ||
74 | YRANGE=" --yrange -0.05 1.05 --yticks 0 0.1" | ||
75 | case $AXIS in | ||
76 | ucap) | ||
77 | XRANGE="--xrange 0.5 32.5 --xticks 0 2" | ||
78 | XRANGE="--xrange 0.5 22.5 --xticks 0 2" | ||
79 | if [ "$SCHED" == "G-EDF" ] && [ "$TEST" == "hard" ] | ||
80 | then | ||
81 | XRANGE="--xrange 0.5 14.5 --xticks 0 1" | ||
82 | fi | ||
83 | AXIS_LABEL="task set utilization (prior to inflation)" | ||
84 | ;; | ||
85 | res) | ||
86 | XRANGE="--xrange 0 5.05 --xticks 0 1" | ||
87 | AXIS_LABEL="average number of resources per task" | ||
88 | ;; | ||
89 | nest) | ||
90 | XRANGE="--xrange 0 0.505 --xticks 0 0.1" | ||
91 | AXIS_LABEL="probability of nested requests" | ||
92 | ;; | ||
93 | contention) | ||
94 | XRANGE="--xrange 45 555 --xticks 0 50" | ||
95 | AXIS_LABEL="requests per resource per second" | ||
96 | ;; | ||
97 | wratio) | ||
98 | XRANGE="--xrange 0 0.505 --xticks 0 0.1" | ||
99 | AXIS_LABEL="ratio of write requests" | ||
100 | ;; | ||
101 | *) | ||
102 | echo "Unkown axis: $AXIS." | ||
103 | AXIS_LABEL="$AXIS" | ||
104 | ;; | ||
105 | esac | ||
106 | TITLE="$TEST schedulability under $SCHED with$PARAMS" | ||
107 | RANGE="$XRANGE $YRANGE" | ||
108 | $PLOTTER $RANGE "$NAME" "$AXIS_LABEL" "ratio of schedulable task sets" "$TITLE" \ | ||
109 | $STRIPPED 1 2 "task-fair mutex" \ | ||
110 | $STRIPPED 1 3 "task-fair RW" \ | ||
111 | $STRIPPED 1 4 "phase-fair RW" | ||
112 | rm $STRIPPED | ||
113 | } | ||
114 | |||
115 | |||
116 | while [ ! -z "$1" ] | ||
117 | do | ||
118 | echo "Plotting $1..." | ||
119 | plot_file $1 | ||
120 | shift | ||
121 | done | ||