home *** CD-ROM | disk | FTP | other *** search
- # $Header: mem.awk,v 3.4 87/06/22 14:27:39 kjmcdonell Beta $
- /real/ { next }
- /^[0-9][ .0-9-]*$/ && NF==3 { \
- r=$2/1000; \
- if (r < 0) { \
- print "** Iteration ",iter+1," real loop < ohead: ",$0; \
- r=0; \
- } \
- iter++; numacc=$1; real+=r; r2+=r*r; cpu+=$3; c2+=$3*$3; \
- next; \
- }
- { print "** Iteration ",iter+1," Failed: ",$0 }
- END {\
- if (iter > 0) { \
- printf "Elapsed Time: %.2f seconds",real/iter; \
- if (iter > 1) printf " (variance %.3f)",(r2-2*real*real/iter+real*real/iter)/(iter-1); \
- printf "\nCPU Time: %.2f seconds",cpu/iter; \
- if (iter > 1) printf " (variance %.3f)",(c2-2*cpu*cpu/iter+cpu*cpu/iter)/(iter-1); \
- print; \
- printf "Real Rate: %.0f int array accesses / second\n",(numacc*iter)/real; \
- } else { \
- print "Elapsed Time: -- no measured results!!"; \
- print "CPU Time: -- no measured results!!"; \
- } \
- }
-