benchmark_all_backends.sh 973 Bytes
Newer Older
Gerard Ryan's avatar
Gerard Ryan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
smallbmargs="--benchmark_report_aggregates_only=true --benchmark_format=csv"
largebmargs="--benchmark_repetitions=20 --benchmark_report_aggregates_only=true --benchmark_format=csv"

backends="2 4 6"

if [ "$1" != "" ];
then
	backends=$1
fi

for i in $backends
do
	(
	BINDIR=bin/backend-$i
	BMDIR=$BINDIR/benchmark

	export DYLD_LIBRARY_PATH=bin/backend-$i/lib:third-party/lib:$DYLD_LIBRARY_PATH
	export LD_LIBRARY_PATH=bin/backend-$i/lib:third-party/lib:$LD_LIBRARY_PATH
	export PATH=bin/backend-$i/lib:third-party/lib:$PATH

	echo "****************************"
	echo Benchmarking MATHBACKEND $i
	echo "****************************"

	for bm in BigIntegerMath NativeIntegerMath BigVectorMath NativeVectorMath NbTheory Lattice LatticeNative
	do
		echo $bm:
		$BMDIR/${bm} ${smallbmargs} 
	done

	for bm in Encoding Crypto SHE
	do
		echo $bm:
		$BMDIR/${bm} ${largebmargs} 
	done

	echo "****************************"
	echo DONE
	echo "****************************"
	)
done