From be610af3ec405f0dbaa4eec3bf94905268b8b392 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sun, 22 Feb 2009 00:41:36 -0500 Subject: remove old bash cruft --- plot_ecrts | 121 ---------------------------------------- plot_scatter | 125 ----------------------------------------- plot_sched | 178 ----------------------------------------------------------- 3 files changed, 424 deletions(-) delete mode 100755 plot_ecrts delete mode 100755 plot_scatter delete mode 100755 plot_sched diff --git a/plot_ecrts b/plot_ecrts deleted file mode 100755 index fd76b22..0000000 --- a/plot_ecrts +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash - - -EPS_FLAG= - -while true; do - case $1 in - --eps) - shift - EPS_FLAG="--eps" - ;; - *) - break - ;; - esac -done - -PLOTTER="plot_scatter $EPS_FLAG --lines " - -function get_tmp_file { - OS=`uname` - if [ $OS == "Linux" ] - then - mktemp - else # Darwin - mktemp -t ecrts - fi -} - -function get_val { - echo "$1" | sed 's/.*=//g' -} - -function plot_file { - SCHED="G-EDF" - FILE=$1 - NAME=`basename $FILE | sed -e 's/.csv//g'` - STRIPPED=`get_tmp_file` - # remove comments for Gnuplot - egrep -v '^#' $FILE > $STRIPPED - if [ ! -s $STRIPPED ] - then - echo "Skipping $FILE since there wasn't any data to be found. " - return - fi - # decode file name - PARAMS= - for KV in `echo $NAME | sed -e 's/_/ /g'` - do - case $KV in - pedf) - SCHED="P-EDF" - ;; - gedf) - SCHED="G-EDF" - ;; - hard) - TEST="hard" - ;; - soft) - TEST="soft" - ;; - axis*) - AXIS=`get_val $KV` - ;; - rmax*|rmin*|wmax*|wmin*) - # ignored, not shown - ;; - *) - PARAMS="$PARAMS $KV" - ;; - esac - done - YRANGE=" --yrange -0.05 1.05 --yticks 0 0.1" - case $AXIS in - ucap) - XRANGE="--xrange 0.5 32.5 --xticks 0 2" - XRANGE="--xrange 0.5 22.5 --xticks 0 2" - if [ "$SCHED" == "G-EDF" ] && [ "$TEST" == "hard" ] - then - XRANGE="--xrange 0.5 14.5 --xticks 0 1" - fi - AXIS_LABEL="task set utilization (prior to inflation)" - ;; - res) - XRANGE="--xrange 0 5.05 --xticks 0 1" - AXIS_LABEL="average number of resources per task" - ;; - nest) - XRANGE="--xrange 0 0.505 --xticks 0 0.1" - AXIS_LABEL="probability of nested requests" - ;; - contention) - XRANGE="--xrange 45 555 --xticks 0 50" - AXIS_LABEL="requests per resource per second" - ;; - wratio) - XRANGE="--xrange 0 0.505 --xticks 0 0.1" - AXIS_LABEL="ratio of write requests" - ;; - *) - echo "Unkown axis: $AXIS." - AXIS_LABEL="$AXIS" - ;; - esac - TITLE="$TEST schedulability under $SCHED with$PARAMS" - RANGE="$XRANGE $YRANGE" - $PLOTTER $RANGE "$NAME" "$AXIS_LABEL" "ratio of schedulable task sets" "$TITLE" \ - $STRIPPED 1 2 "task-fair mutex" \ - $STRIPPED 1 3 "task-fair RW" \ - $STRIPPED 1 4 "phase-fair RW" - rm $STRIPPED -} - - -while [ ! -z "$1" ] -do - echo "Plotting $1..." - plot_file $1 - shift -done diff --git a/plot_scatter b/plot_scatter deleted file mode 100755 index de709f3..0000000 --- a/plot_scatter +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash - -#NICE="blacktext linewidth 4.0 \"Helvetica\" 16 " - -# try thinner lines -NICE="color blacktext solid linewidth 1.0 \"Helvetica\" 20 size 16cm,7cm" - -EXT="png" -TERMINAL="png size 1024,768 large" - -GRAPH=points -XTRA= -while true; do - case $1 in - --eps) - shift - EXT="eps" - TERMINAL="postscript eps $NICE" - ;; - --lines) - shift - GRAPH=lines - ;; - --xrange) - shift - XRANGE="set xrange [$1:$2]" - shift - shift - ;; - --xticks) - shift - XTICKS="set xtics $1, $2" - shift - shift - ;; - --yrange) - shift - YRANGE="set yrange [$1:$2]" - shift - shift - ;; - --yticks) - shift - YTICKS="set ytics $1, $2" - shift - shift - ;; - --extra) - shift - XTRA="$1" - ;; - --linespoints) - shift - GRAPH=linespoints - ;; - --*) - echo "unrecognized option: $1" - exit 1 - ;; - *) - break - ;; - esac -done - - -OUT=$1 -XLABEL=$2 -YLABEL=$3 -TITLE=$4 -shift 4 - -PLOT="plot " - - -while [ ! -z "$1" ] && [ ! -z "$2" ] && [ ! -z "$3" ] && [ ! -z "$4" ]; do - CSV=$1 - COL1=$2 - COL2=$3 - NAME=$4 - PLOT="$PLOT '${CSV}' using ${COL1}:${COL2} title '${NAME}' with $GRAPH" - shift 4 - if [ ! -z "$1" ]; then - PLOT="$PLOT, " - fi - # fixup csv file, gnuplot is picky - sed -i -e 's/,\([^ ]\)/, \1/g' "$CSV" -done - -#echo $OUT -#echo $XLABEL -#echo $YLABEL -#echo $TITLE -#echo $PLOT - -if [ "$PLOT" = "plot " ]; then - echo "Usage: $0 [--eps] "\ - "(<csv file> <column1> <column2> <label>)+" - exit 1 -fi - -OUT="${OUT}.${EXT}" -KEY="set key below" -KEY="set key off" -gnuplot <<EOM -set terminal $TERMINAL -set out '/dev/null' -$YRANGE -$YTICKS -$XRANGE -$XTICKS -$PLOT -set ylabel '$YLABEL' -set xlabel '$XLABEL' -set title '$TITLE' -$KEY -set data style $GRAPH -set out '$OUT' -replot -set out -EOM - -if [ "$EXT" == "eps" ]; then - ps2pdf -dEPSCrop $OUT -fi diff --git a/plot_sched b/plot_sched deleted file mode 100755 index 1d1614c..0000000 --- a/plot_sched +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/bash - -#NICE="blacktext linewidth 4.0 \"Helvetica\" 16 " - -# try thinner lines -NICE="blacktext linewidth 1.0 \"Helvetica\" 16 " - -if [ "$1" == "--eps" ]; then - EXT="eps" -# TERMINAL="postscript eps color $NICE" - TERMINAL="postscript eps $NICE" - shift -else - EXT="png" - TERMINAL="png picsize 1024 768" -fi - -CSV1=$1 -TITLE=$2 -OUT=$3 - -if [ ! -f "$CSV1" ]; then - echo "Usage: plot_sched <data.csv> [<title>] [<out.png>]" - exit 1 -fi - -HARDSOFT=`basename $CSV1 | sed -e 's/^\([^_]*\).*/\1/'` -KIND=`basename $CSV1 | sed -e 's/^[^_]*_\([^_]*\).*/\1/'` -FDIST=`basename $CSV1 | sed -e 's/^[^_]*_[^_]*_dist=\(.*\).csv/\1/'` - -case "$FDIST" in - uni_light) - DIST="uniformly distributed in [0.001, 0.1]" - ;; - uni_medium) - DIST="uniformly distributed in [0.1, 0.4]" - ;; - uni_heavy) - DIST="uniformly distributed in [0.5, 0.9]" - ;; - bimo_light) - DIST="bimodally distributed in [0.001, 0.5] (8/9) and [0.5, 0.9] (1/9)" - ;; - bimo_medium) - DIST="bimodally distributed in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)" - ;; - bimo_heavy) - DIST="bimodally distributed in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)" - ;; - *) - ;; -esac - -echo "Hard/Soft : $HARDSOFT" -echo "Study : $KIND" -echo "Distribution: $DIST" - -XLABEL="utilization cap" -XRANGE="set xrange [0.5:32.5]; set xtics 0, 2" - -STYLE="lines lw 3" -#STYLE=linespoints - - -LINESTYLE=" \ - set style line 1 lt rgb 'blue'; \ - set style line 2 lt rgb 'orange-red'; \ -" - -case "$KIND" in - sched) - YLABEL="schedulability" - YRANGE="set yrange [-0.1:1.1]" - case "$HARDSOFT" in - soft) - PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \ - '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \ - '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \ - '$CSV1' using 1:5 title 'PFAIR' with $STYLE, \ - '$CSV1' using 1:6 title 'S-PFAIR' with $STYLE, \ - '$CSV1' using 1:7 title 'G-NP-EDF' with $STYLE - " - if [ "$FDIST" != "uni_light" ]; then - XRANGE="set xrange [21.5:32.5]; set xtics 0, 2" - fi - ;; - hard) - PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \ - '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \ - '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \ - '$CSV1' using 1:5 title 'PFAIR' with $STYLE, \ - '$CSV1' using 1:6 title 'S-PFAIR' with $STYLE - " - ;; - esac - ;; - tard) - YLABEL="tardiness (in ms)" - YRANGE= - PLOT="plot '$CSV1' using 1:2 title 'C-EDF' with $STYLE, \ - '$CSV1' using 1:3 title 'G-EDF' with $STYLE, \ - '$CSV1' using 1:4 title 'G-NP-EDF' with $STYLE - " - ;; - util) - YLABEL="utilization (incl. overheads)" - YRANGE= - case "$HARDSOFT" in - soft) - PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \ - '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \ - '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \ - '$CSV1' using 1:5 title 'PFAIR' with $STYLE, \ - '$CSV1' using 1:6 title 'G-NP-EDF' with $STYLE - " - ;; - hard) - PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \ - '$CSV1' using 1:3 title 'C-EDF' with $STYLE, \ - '$CSV1' using 1:4 title 'G-EDF' with $STYLE, \ - '$CSV1' using 1:5 title 'PFAIR' with $STYLE \ - " - ;; - esac - ;; - gedf) - YLABEL="schedulability" - YRANGE="set yrange [-0.1:1.1]" - PLOT="plot '$CSV1' using 1:2 title 'P-EDF' with $STYLE, \ - '$CSV1' using 1:8 title 'G-EDF (all)' with $STYLE, \ - '$CSV1' using 1:3 title 'G-EDF [GFB03]' with $STYLE, \ - '$CSV1' using 1:4 title 'G-EDF [BAK03]' with $STYLE, \ - '$CSV1' using 1:5 title 'G-EDF [BCL05]' with $STYLE, \ - '$CSV1' using 1:6 title 'G-EDF [BCL08]' with $STYLE, \ - '$CSV1' using 1:7 title 'G-EDF [SKB07]' with $STYLE \ - " - ;; - *) - YLABEL="" - YRANGE="" - ;; -esac - -BASE=`basename $CSV1 | sed -e s/.csv//g -e s/dist=//g ` - -#echo $BASE - -if [ "$OUT" == "" ]; then - OUT="${BASE}.${EXT}" -fi - -if [ "$TITLE" == "" ]; then - TITLE="$DIST" -fi - -# fixup csv file, gnuplot is picky -sed -i -e 's/,\([^ ]\)/, \1/g' $CSV1 - -gnuplot <<EOM -set terminal $TERMINAL -set out '/dev/null' -$YRANGE -$XRANGE -$PLOT -set ylabel '$YLABEL' -set xlabel '$XLABEL' -set title '$TITLE' -set key below -#set data style $STYLE -set out '$OUT' -set palette defined ( 0 "blue", 3 "green", 6 "yellow", 10 "red" ) -replot -set out -EOM - -if [ "$EXT" == "eps" ]; then - ps2pdf -dEPSCrop $OUT -fi -- cgit v1.2.2