5 PERCENTILES
="0 .25 .50 .75 .99 .999 .9999 1"
8 cat /dev
/null
> ${t}.avg.dat
9 for p
in $PERCENTILES; do
10 cat /dev
/null
> ${t}$p.percentile.dat
13 for c
in $NCONSUMERS; do
15 INPUT
=${t}.
${c}.16.txt
16 awk -v c
=$c '/^HISTO/ {
21 printf("%d %f\n", c, s/n);
22 }' $INPUT >> ${t}.avg.dat
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; }
32 if (x == 0 && s >= p) {
40 printf("%d %f\n", c, x);
41 }' >> ${t}${p}.percentile.dat