clean up benchmarking scripts
This commit is contained in:
parent
b5afc94752
commit
46084e1413
|
@ -1,4 +1,4 @@
|
|||
.DS_store
|
||||
a.out
|
||||
build
|
||||
target
|
||||
a.out
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
ORIG=`pwd`
|
||||
cd ../../src/Blake3/
|
||||
cd ../../../src/Blake3/
|
||||
IMPL=`pwd`
|
||||
|
||||
cd $IMPL
|
||||
|
@ -11,7 +11,10 @@ cd $IMPL/b3sum
|
|||
cargo build --release
|
||||
|
||||
cd $ORIG
|
||||
cp $IMPL/b3sum/target/release/b3sum .
|
||||
|
||||
gcc -O3 fakedata.c -o fakedata
|
||||
mkdir -p build
|
||||
|
||||
cp $IMPL/b3sum/target/release/b3sum build/
|
||||
|
||||
gcc -O3 fakedata.c -o build/fakedata
|
||||
|
||||
|
|
|
@ -1,2 +1,14 @@
|
|||
#!/bin/bash
|
||||
./fakedata $ZKBENCH_MEGABYTES | ./b3sum --num-threads $ZKBENCH_NTHREADS -
|
||||
|
||||
if [ -z ${ZKBENCH_NTHREADS} ]; then
|
||||
ZKBENCH_NTHREADS=1
|
||||
fi
|
||||
|
||||
if [ -z ${ZKBENCH_MEGABYTES} ]; then
|
||||
ZKBENCH_MEGABYTES=256
|
||||
fi
|
||||
|
||||
echo "NTHREADS = $ZKBENCH_NTHREADS"
|
||||
echo "MEGABYTES = $ZKBENCH_MEGABYTES"
|
||||
|
||||
./build/fakedata $ZKBENCH_MEGABYTES | ./build/b3sum --num-threads $ZKBENCH_NTHREADS -
|
||||
|
|
|
@ -3,6 +3,8 @@ echo "build"
|
|||
|
||||
ZIK_PATH="../../../src/zikkurat-algebra/"
|
||||
|
||||
mkdir -p build
|
||||
|
||||
gcc -O3 \
|
||||
-I ${ZIK_PATH}/lib/cbits/bigint/ \
|
||||
-I ${ZIK_PATH}/lib/cbits/curves/fields/std/ \
|
||||
|
@ -11,4 +13,4 @@ gcc -O3 \
|
|||
${ZIK_PATH}/lib/cbits/curves/fields/std/bn128_r_std.c \
|
||||
${ZIK_PATH}/lib/cbits/curves/fields/mont/bn128_r_mont.c \
|
||||
poseidon2.c \
|
||||
-o a.out
|
||||
-o build/a.out
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
./a.out $ZKBENCH_TREE_DEPTH $ZKBENCH_NTHREADS
|
||||
if [ -z ${ZKBENCH_NTHREADS} ]; then
|
||||
ZKBENCH_NTHREADS=1
|
||||
fi
|
||||
|
||||
if [ -z ${ZKBENCH_TREE_DEPTH} ]; then
|
||||
ZKBENCH_TREE_DEPTH=16
|
||||
fi
|
||||
|
||||
echo "NTHREADS = $ZKBENCH_NTHREADS"
|
||||
echo "TREE_DEPTH = $ZKBENCH_TREE_DEPTH"
|
||||
|
||||
./build/a.out $ZKBENCH_TREE_DEPTH $ZKBENCH_NTHREADS
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "setup"
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
gcc -O3 sha2.c bench_linear.c -o bench_linear
|
||||
gcc -O3 sha2.c bench_merkle.c -o bench_merkle
|
||||
mkdir -p build
|
||||
|
||||
gcc -O3 sha2.c bench_linear.c -o build/bench_linear
|
||||
gcc -O3 sha2.c bench_merkle.c -o build/bench_merkle
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z ${ZKBENCH_WHICH} ]; then
|
||||
ZKBENCH_WHICH="LINEAR"
|
||||
fi
|
||||
|
||||
if [ -z ${ZKBENCH_NTHREADS} ]; then
|
||||
ZKBENCH_NTHREADS=1
|
||||
fi
|
||||
|
||||
if [ -z ${ZKBENCH_MEGABYTES} ]; then
|
||||
ZKBENCH_MEGABYTES=128
|
||||
fi
|
||||
|
||||
echo "WHICH = $ZKBENCH_WHICH"
|
||||
echo "NTHREADS = $ZKBENCH_NTHREADS"
|
||||
echo "MEGABYTES = $ZKBENCH_MEGABYTES"
|
||||
|
||||
case $ZKBENCH_WHICH in
|
||||
LINEAR)
|
||||
build/bench_linear $ZKBENCH_MEGABYTES
|
||||
;;
|
||||
MERKLE)
|
||||
build/bench_merkle $ZKBENCH_MEGABYTES $ZKBENCH_NTHREADS
|
||||
;;
|
||||
*)
|
||||
echo "unknown selector: \`$ZKBENCH_WHICH\`"
|
||||
exit 99
|
||||
;;
|
||||
esac
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "setup"
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
gcc -O3 fakedata.c -o fakedata
|
||||
mkdir -p build
|
||||
|
||||
gcc -O3 fakedata.c -o build/fakedata
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
./fakedata $ZKBENCH_MEGABYTES | shasum -a256 -b -
|
||||
if [ -z ${ZKBENCH_MEGABYTES} ]; then
|
||||
ZKBENCH_MEGABYTES=128
|
||||
fi
|
||||
|
||||
echo "MEGABYTES = $ZKBENCH_MEGABYTES"
|
||||
|
||||
./build/fakedata $ZKBENCH_MEGABYTES | shasum -a256 -b -
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "setup"
|
Loading…
Reference in New Issue