Debian Codegraph @

tools/ez

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2
3 # This script file runs allcalc and
4 # displays graphs from the output files.
5
6 # Default values and variable declaration #
7 num=0
8 window=1
9 delay=FALSE
10 args=$#
11
12 # Formatting for Bit Rate Plot #
13 echoscip-shell system . . echo. "set title 'Bit Rate vs. Start Window Time'">gnudata
14 echoscip-shell system . . echo. "set xlabel 'Time(s)'">>gnudata
15 echoscip-shell system . . echo. "set ylabel 'Bit Rate'">>gnudata
16 echoscip-shell system . . echo. "set data style steps">>gnudata
17 echoscip-shell system . . echo. "set yrange [0:*]">>gnudata
18
19 # Usage statement #
20 if [scip-shell system . . `[`. $# = 0 ]; then
21 clearscip-shell system . . clear.
22 echoscip-shell system . . echo. "Usage: -d delay plot and rate plot(default=rate plot) -w window_time"
23 echoscip-shell system . . echo. "-g to produce .gif file(s) -l logFile -f flow_ids--seperated by spaces"
24 echoscip-shell system . . echo. "note: the -f option must be specified last"
25 rmscip-shell system . . rm. gnudata
26 else
27 echoscip-shell system . . echo. "Ode to LAZYPLUS"
28
29 # Searches command line for arguments #
30 while [scip-shell system . . `[`. -n "$(echoscip-shell system . . echo. $1 | grepscip-shell system . . grep. '-')" ]; do
31 case $1 in
32 -w ) window=$2
33 args=$(($args-2))
34 shift;;
35 -d ) delay=TRUE
36 num=1;;
37 -g ) gif=TRUE
38 if [scip-shell system . . `[`. $delay = TRUE ]; then
39 num=2
40 else
41 num=1
42 fi;;
43 -l ) logFile=$2
44 args=$(($args-2))
45 shift;;
46 -f ) flow=$2
47 args=$(($args-1))
48 count=0
49 # Loops through all arguments after the -f option #
50 while [scip-shell system . . `[`. $args -gt $num ]; do
51 ./allcalc -f $2 -w $window $logFile $2.iljjfe
52 file=$2.iljjfe
53
54 # Determines whether to send plot or replot command to #
55 # gnuplot scripts #
56 if [scip-shell system . . `[`. $count = 0 ]; then
57 echoscip-shell system . . echo. "plot '$file' using 5:9 title 'flow $2'">>gnudata
58 if [scip-shell system . . `[`. $delay = TRUE ]; then
59 echoscip-shell system . . echo. "set title 'Delay vs. Recieve Time'">gnudata1
60 echoscip-shell system . . echo. "set ylabel 'Delay'">>gnudata1
61 echoscip-shell system . . echo. "set xlabel 'Recieve Time'">>gnudata1
62 echoscip-shell system . . echo. "set data style lines">>gnudata1
63 echoscip-shell system . . echo. "plot '$file' using 3:4 title 'flow $2'">>gnudata1
64 fi
65 else
66 echoscip-shell system . . echo. "replot '$file' using 5:9 title 'flow $2'">>gnudata
67 echoscip-shell system . . echo. "replot '$file' using 3:4 title 'flow $2'">>gnudata1
68 fi
69 shift
70 args=$(($args-1))
71 count=$(($count+1))
72 done
73
74 if [scip-shell system . . `[`. $gif = TRUE ]; then
75 echoscip-shell system . . echo. "Enter test name"
76 read testname
77 plot=rate_$testname.gif
78 echoscip-shell system . . echo. "set term gif">>gnudata
79 echoscip-shell system . . echo. "set output '$plot'">>gnudata
80 echoscip-shell system . . echo. "replot">>gnudata
81 if [scip-shell system . . `[`. $delay = TRUE ]; then
82 plot=delay_$testname.gif
83 echoscip-shell system . . echo. "set term gif">>gnudata1
84 echoscip-shell system . . echo. "set output '$plot'">>gnudata1
85 echoscip-shell system . . echo. "replot">>gnudata1
86 fi
87 fi
88
89 # Sends gnuplot the script files #
90 gnuplot -persist gnudata
91 if [scip-shell system . . `[`. $delay = TRUE ]; then
92 gnuplot -persist gnudata1
93 fi
94
95 # Cleanup #
96 rmscip-shell system . . rm. gnudata
97 rmscip-shell system . . rm. gnudata1
98 rmscip-shell system . . rm. *.iljjfe;;
99 esac
100 shift
101 done
102
103 fi
104