summaryrefslogtreecommitdiff
path: root/catlfish-benchmark/bench.sh
diff options
context:
space:
mode:
Diffstat (limited to 'catlfish-benchmark/bench.sh')
-rwxr-xr-x[-rw-r--r--]catlfish-benchmark/bench.sh38
1 files changed, 32 insertions, 6 deletions
diff --git a/catlfish-benchmark/bench.sh b/catlfish-benchmark/bench.sh
index 126b4af..e53b061 100644..100755
--- a/catlfish-benchmark/bench.sh
+++ b/catlfish-benchmark/bench.sh
@@ -1,9 +1,24 @@
#! /bin/sh
+./createca.sh
+./createcert.sh
+./createlogkey.sh
+./createauthkeys.sh
+
+mkdir -p bench/merge/db/
+touch bench/merge/db/logorder
+
+mkdir -p bench/fest/db/
+touch bench/fest/db/index
+touch bench/fest/db/newentries
+
+mkdir -p bench/mergebackup/db/
+touch bench/mergebackup/db/logorder
+printf 0 > bench/mergebackup/db/verifiedsize
+
+
iterations=2
-chunksize=10000
[ -n "$1" ] && { ierations=$1; shift; }
-[ -n "$1" ] && { chunksize=$1; shift; }
erlbase=/usr/local/catlfish
@@ -16,18 +31,29 @@ for nodename in mergebackup signing fest; do
"exec $erlbase/bin/erl -config $nodename"
done
-for iter in $iterations; do
+sleep 3
+
+/usr/local/src/catlfish/tools/merge \
+ --config /usr/local/etc/catlfish/catlfish.cfg \
+ --localconfig /usr/local/etc/catlfish/merge.cfg \
+ --timing 2>mergeoutput.0 || exit 1
+
+
+for iter in $(seq $iterations); do
echo "Iteration ${iter}/${iterations} starting"
- ./submit.sh $chunksize
+
+ until /usr/local/src/catlfish/tools/submitcert.py --parallel 8 --store /var/local/testcerts/bulk-1.zip --cafile httpsca/demoCA/cacert.pem --sct-file=sct-iter-$iter https://localhost:8080/ ; do sleep 10; done
echo "$0: merging"
date
- python /usr/local/src/catlfish/tools/merge.py \
+ /usr/local/src/catlfish/tools/merge \
--config /usr/local/etc/catlfish/catlfish.cfg \
--localconfig /usr/local/etc/catlfish/merge.cfg \
- --timing
+ --timing 2>mergeoutput.$iter || exit 1
date
+ /usr/local/src/catlfish/tools/verifysct.py --sct-file sct-iter-$iter --cafile httpsca/demoCA/cacert.pem --publickey keys/logkey.pem https://localhost:8080/ || exit 1
+
echo "Iteration ${iter}/${iterations} finished"
done