Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / Colocated_Roundtrip / generate_percentiles.sh
blob1ee7132114621b12a65aaf9717d24f2f89a2e4e7
1 #/bin/sh
3 . parameters
5 PERCENTILES="0 .25 .50 .75 .99 .999 .9999 1"
7 for t in $*; do
8 cat /dev/null > ${t}.avg.dat
9 for p in $PERCENTILES; do
10 cat /dev/null > ${t}$p.percentile.dat
11 done
13 for c in $NCONSUMERS; do
14 echo $t $c
15 INPUT=${t}.${c}.16.txt
16 awk -v c=$c '/^HISTO/ {
17 n++;
18 s += $3
20 END {
21 printf("%d %f\n", c, s/n);
22 }' $INPUT >> ${t}.avg.dat
24 TFILE=/tmp/${t}.$$
25 awk '/^HISTO/ {print $3}' $INPUT | sort -n | uniq -c > $TFILE
26 for p in $PERCENTILES; do
27 awk -v N=$ITERATIONS '{print $2, $1 / N}' $TFILE |
28 awk -v c=$c -v p=${p} '\
29 BEGIN { x = 0; l = 0; }
30 { s += $2;
31 l = $1;
32 if (x == 0 && s >= p) {
33 x = $1;
36 END {
37 if (s < p) {
38 x = l;
40 printf("%d %f\n", c, x);
41 }' >> ${t}${p}.percentile.dat
42 done
43 /bin/rm -f $TFILE
45 done
47 done