1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 13:30:38 +02:00

m1/perf/tabular: print total run time at the end

This commit is contained in:
Werner Almesberger 2011-09-23 22:19:36 -03:00
parent e2c133e056
commit af8935f5be

View File

@ -149,6 +149,10 @@ fi
echo "Original New sched (no opt) New sched (LCPF) Equiv Name" echo "Original New sched (no opt) New sched (LCPF) Equiv Name"
echo "Time Size Eff Regs Time Size Eff Regs Time Size Eff Regs" echo "Time Size Eff Regs Time Size Eff Regs Time Size Eff Regs"
tref=0
tnew=0
topt=0
for n in `ls -1 data/ref/out`; do for n in `ls -1 data/ref/out`; do
ref=`sum ref $n` ref=`sum ref $n`
new=`sum new $n` new=`sum new $n`
@ -159,4 +163,11 @@ for n in `ls -1 data/ref/out`; do
`time opt $n` `size opt $n` `eff opt $n` `regs opt $n` \ `time opt $n` `size opt $n` `eff opt $n` `regs opt $n` \
`eq $ref $new`/`eq $ref $opt`/`eq $new $opt` `eq $ref $new`/`eq $ref $opt`/`eq $new $opt`
echo $n echo $n
tref="$tref `time ref $n` +"
tnew="$tnew `time new $n` +"
topt="$topt `time opt $n` +"
done done
printf "Original time: %9.1f s\n" `dc -e "$tref p"`
printf "New (unopt) time: %6.1f s\n" `dc -e "$tnew p"`
printf "New (opt) time: %8.1f s\n" `dc -e "$topt p"`