vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

run.sh (908B)


      1 #!/bin/sh
      2 # Simple script to run benchmarks on all the microbenchmarks
      3 # and append the results to a file called results.txt
      4 
      5 runprim()
      6 {
      7 	prog=$1
      8 	hcmd=$2
      9 	vcmd=$3
     10 
     11 	#echo "hcmd $hcmd"
     12 	#echo "vcmd $vcmd"
     13 
     14 	echo "$prog"
     15 	echo "$prog" >results.txt.tmp
     16 
     17 	# Native execution timings
     18 	echo "native	" >>results.txt.tmp
     19 	(time -p $hcmd) 2>>results.txt.tmp
     20 
     21 	# VX32 execution timings
     22 	echo "vx32	" >>results.txt.tmp
     23 	(time -p $vcmd) 2>>results.txt.tmp
     24 
     25 	tr -s " \n" "\t\t" <results.txt.tmp >>results.txt
     26 	echo >>results.txt
     27 }
     28 
     29 runtest()
     30 {
     31 	runprim $1 "./h$1" "../vxrun/vxrun ./v$1"
     32 }
     33 
     34 echo >>results.txt
     35 echo "Test on "`uname -psr`" at "`date` >>results.txt
     36 
     37 runtest jump
     38 runtest jumpal
     39 runtest jumpfar
     40 runtest call
     41 runtest callind
     42 runtest syscall
     43 runtest read
     44 runtest write
     45 runprim nullrun "./hrepeat 1000 ./hnull" "../vxrun/vxrun -r1000 ./vnull"
     46 runtest 64add
     47 runtest 64div
     48 runtest 64mul
     49 
     50 rm -f results.txt.tmp
     51