summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/EC_Multiple/gen_utilization
blob: f39760531f0d753c3ee3cfecf90d842d5870f78e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
#
# $Id$
#

HP_WORKLOADS="60 65 70 72 74 76 78 80 81 82 83 84 85 86 87 88 89 90"


for w in $HP_WORKLOADS; do
  echo $w
  ./histo.pl -k 'Laxity\[LCL,LP' UTL.LCL.${w}.log > UTL.XLCL.${w}.LP.histo
  ./histo.pl -k 'Laxity\[LCL,HP' UTL.LCL.${w}.log > UTL.XLCL.${w}.HP.histo
  ./histo.pl -k 'Laxity\[LCL,LP' UTL.ECM1.${w}.log UTL.ECM2.${w}.log > UTL.LCL.${w}.LP.histo
  ./histo.pl -k 'Laxity\[LCL,HP' UTL.ECM1.${w}.log UTL.ECM2.${w}.log > UTL.LCL.${w}.HP.histo
done

HP_MSGS=200
HP_CONSUMERS=1

LP_WORKLOAD=500
LP_MSGS=50
LP_CONSUMERS=1

WORK_USEC=118

# awk '{print $1, 100 * ($1 * 200 + 500 * 50) * 118 / $2}' |

grep 'Min' UTL.XLCL.*.LP.histo |
 sed -e 's/UTL.XLCL.//' -e s'/.LP.histo:Min://' -e 's/,//g' |
 awk '{print $1, $6, $2, $4}' |
 sort -n > UTL.XLCL.LP.LAX.data

grep 'Min' UTL.XLCL.*.HP.histo |
 sed -e 's/UTL.XLCL.//' -e s'/.HP.histo:Min://' -e 's/,//g' |
 awk '{print $1, $6, $2, $4}' |
 sort -n > UTL.XLCL.HP.LAX.data

grep 'Min' UTL.LCL.*.LP.histo |
 sed -e 's/UTL.LCL.//' -e s'/.LP.histo:Min://' -e 's/,//g' |
 awk '{print $1, $6, $2, $4}' |
 sort -n > UTL.LCL.LP.LAX.data

grep 'Min' UTL.LCL.*.HP.histo |
 sed -e 's/UTL.LCL.//' -e s'/.HP.histo:Min://' -e 's/,//g' |
 awk '{print $1, $6, $2, $4}' |
 sort -n > UTL.LCL.HP.LAX.data

cat UTL.LCL.LP.LAX.data |
  awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.LCL.LP.data
cat UTL.XLCL.LP.LAX.data |
  awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.XLCL.LP.data
cat UTL.LCL.HP.LAX.data |
  awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.LCL.HP.data
cat UTL.XLCL.HP.LAX.data |
  awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.XLCL.HP.data

exit 0

gnuplot <<_EOF_
set grid xtics ytics
set terminal postscript eps color
set xlabel "CPU Utilization (percentage)"

set ylabel "Minimum laxity for low-priority task"
set output "UTL.LCL.eps"
plot 'UTL.LCL.data' w l
#set terminal x11
#plot 'UTL.LCL.data' w l
#pause 2

_EOF_

for i in UTL.*.eps; do
  b=`basename $i .eps`
  gs -sDEVICE=jpeg -g640x480 -r110x110 -sNOPAUSE \
      -sOutputFile="${b}.jpg" ${b}.eps quit.ps
done

grep 'Time\[LCL,HP' UTL.LCL.*.log | sed -e 's/UTL.LCL.//' -e s'/.log:Time\[.*\]://' | awk '{if ($1 != 0) {print $2 / $1 / 200}}'