vx32

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

run.sh (838B)


      1 #!/bin/sh
      2 # Simple script to run benchmarks on all the hash functions
      3 # and append the results to a file called results.txt
      4 
      5 runtest()
      6 {
      7 	prog=$1
      8 	data=$2
      9 
     10 	echo "$prog"
     11 	echo "$prog" >results.txt.tmp
     12 
     13 	# Native execution timings
     14 	echo "native	" >>results.txt.tmp
     15 	(time -p $prog/hd$prog <$data >/dev/null ) \
     16 		2>>results.txt.tmp
     17 
     18 	# VX32 execution timings
     19 	echo "vx32	" >>results.txt.tmp
     20 	(time -p ../vxrun/vxrun $prog/d$prog <$data >/dev/null ) \
     21 		2>>results.txt.tmp
     22 
     23 	tr -s " \n" "\t\t" <results.txt.tmp >>results.txt
     24 	echo >>results.txt
     25 }
     26 
     27 echo >>results.txt
     28 echo "Test on "`uname -psr`" at "`date` >>results.txt
     29 
     30 runtest zlib data/gccbinu.tar.zlib
     31 runtest bz2 data/gccbinu.tar.bz2
     32 runtest jpeg data/mountains2.jpg
     33 runtest jp2 data/mountains2.jp2
     34 runtest vorbis data/gently.ogg
     35 runtest flac data/gently.flac
     36 
     37 rm -f results.txt.tmp
     38