forked from privacy-scaling-explorations/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 391
/
Copy pathexecBench.sh
executable file
·56 lines (51 loc) · 1.18 KB
/
execBench.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -e
#set -x
prnumber=$1
base_dir="/home/CI/CI_Prover_Benches/"
target_dir="$base_dir"PR"$1"
k=$2
circuit=$(echo $3 | awk '{ print $2 }' | tr '[:upper:]' '[:lower:]')
printf -v _date '%(%Y-%m-%d_%H:%M:%S)T' -1
case $circuit in
"all")
echo "To be implemented"
exit 1
;;
"evm")
run_suffix="evm_circuit_prover"
;;
"keccak")
run_suffix="keccak_round"
;;
"state")
run_suffix="state_circuit_prover"
;;
"tx")
run_suffix="tx_circuit_prover"
;;
"super")
run_suffix="super_circuit_prover"
;;
"bytecode")
run_suffix="bytecode_circuit_prover"
;;
"pi")
run_suffix="pi_circuit_prover"
;;
"exp")
run_suffix="exp_circuit_prover"
;;
"copy")
run_suffix="copy_circuit_prover"
;;
*)
echo "No proper value"
exit 1
;;
esac
cd $target_dir;
logfile=$_date--${circuit}_bench-$k.proverlog
export RUST_BACKTRACE=1
DEGREE=$k ~/.cargo/bin/cargo test --profile bench bench_${run_suffix} -p circuit-benchmarks --features benches -- --nocapture > "$target_dir/$logfile" 2>&1
exit 0