aboutsummaryrefslogtreecommitdiffstats
path: root/plot_ecrts
diff options
context:
space:
mode:
Diffstat (limited to 'plot_ecrts')
-rwxr-xr-xplot_ecrts84
1 files changed, 84 insertions, 0 deletions
diff --git a/plot_ecrts b/plot_ecrts
new file mode 100755
index 0000000..3bcd004
--- /dev/null
+++ b/plot_ecrts
@@ -0,0 +1,84 @@
1#!/bin/bash
2
3
4EPS_FLAG=
5
6while true; do
7 case $1 in
8 --eps)
9 shift
10 EPS_FLAG="--eps"
11 ;;
12 *)
13 break
14 ;;
15 esac
16done
17
18PLOTTER="plot_scatter $EPS_FLAG --lines --xrange 0.5 32.5 --yrange -0.05 1.05 --xticks 0 2 --yticks 0 0.1"
19
20function 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
30function get_val {
31 echo "$1" | sed 's/.*=//g'
32}
33
34function 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 # decode file name
42 PARAMS=
43 for KV in `echo $NAME | sed -e 's/_/ /g'`
44 do
45 case $KV in
46 pedf)
47 SCHED="P-EDF"
48 ;;
49 gedf)
50 SCHED="G-EDF"
51 ;;
52 hard)
53 TEST="hard"
54 ;;
55 soft)
56 TEST="soft"
57 ;;
58 axis*)
59 AXIS=`get_val $KV`
60 ;;
61 rmax*|rmin*|wmax*|wmin*)
62 # ignored, not shown
63 ;;
64 *)
65 PARAMS="$PARAMS $KV"
66 ;;
67 esac
68 done
69 TITLE="$TEST schedulability under $SCHED with$PARAMS"
70 echo $TITLE
71 $PLOTTER "$NAME" "$AXIS" "Schedulability" "$TITLE" \
72 $STRIPPED 1 2 "fair mutex" \
73 $STRIPPED 1 3 "task-fair RW" \
74 $STRIPPED 1 4 "phase-fair RW"
75 rm $STRIPPED
76}
77
78
79while [ ! -z "$1" ]
80do
81 echo "Plotting $1..."
82 plot_file $1
83 shift
84done