summaryrefslogtreecommitdiff
path: root/test/scripts/perf-test.sh
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-02-08 15:37:40 +0100
committerMagnus Ahltorp <map@kth.se>2017-02-08 15:37:40 +0100
commit9611100d3a0c841770a4cedc7507b6d27331b495 (patch)
tree0546678b1b2a054269f7e601eeff50c34d34f2be /test/scripts/perf-test.sh
parent4fa717f62a909b46fcc35df19c7b75e11e8226a2 (diff)
Make perf-test work with continuous merge
Diffstat (limited to 'test/scripts/perf-test.sh')
-rwxr-xr-xtest/scripts/perf-test.sh44
1 files changed, 28 insertions, 16 deletions
diff --git a/test/scripts/perf-test.sh b/test/scripts/perf-test.sh
index aaf3b1d..3766cf1 100755
--- a/test/scripts/perf-test.sh
+++ b/test/scripts/perf-test.sh
@@ -10,32 +10,39 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd)
SCRIPTS=${top_srcdir}/test/scripts
tests_start() {
- ${SCRIPTS}/light-system-test-start.sh
+ ${SCRIPTS}/light-system-test-start.sh "$@"
}
tests_stop() {
- ${SCRIPTS}/light-system-test-stop.sh
+ ${SCRIPTS}/light-system-test-stop.sh "$@"
+}
+
+tests_stop_all() {
+ ${SCRIPTS}/light-system-test-stop.sh mergeprimary mergesecondary frontend storage signing
}
${SCRIPTS}/light-system-test-prepare.sh
+${top_srcdir}/tools/initlog.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg
cp ${top_srcdir}/test/known_roots/* known_roots
-tests_start
+tests_start signing
+tests_start mergesecondary storage frontend mergeprimary
-do_merge
+do_merge 0
check_sth
assert_equal "Tree size" "$(get_treesize)" 0
-python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/test/bulktestcerts/0000.zip --sct-file=submittedcerts ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || (tests_stop ; fail "Submission failed")
-
+python ${top_srcdir}/tools/submitcert.py --parallel=30 --store ${top_srcdir}/test/bulktestcerts/0000.zip --sct-file=submittedcerts ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || (tests_stop ; fail "Submission failed")
-do_merge 2> bench-1 || (tests_stop ; fail "Merge failed")
+do_merge 10000 || (tests_stop ; fail "Merge failed")
check_sth || (tests_stop ; fail "Check STH failed")
+wait_for_equal "Tree size" "${top_srcdir}/tools/mergestatus.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg" "10000 10000 10000" 400
+
sleep 5
-tests_stop
+tests_stop mergesecondary storage frontend mergeprimary
sleep 5
mv mergedb mergedb-down
@@ -44,13 +51,17 @@ mkdir mergedb-secondary
touch mergedb-secondary/logorder
printf 0 > mergedb-secondary/verifiedsize
-tests_start
+${top_srcdir}/tools/initlog.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg --promote-secondary
+
+tests_start mergesecondary storage frontend mergeprimary
-do_merge 2> bench-2 || (tests_stop ; fail "Merge failed")
+do_merge 10000 || (tests_stop ; fail "Merge failed")
check_sth || (tests_stop ; fail "Check STH failed")
+wait_for_equal "Tree size" "${top_srcdir}/tools/mergestatus.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg" "10000 10000 10000" 400
+
sleep 5
-tests_stop
+tests_stop mergesecondary storage frontend mergeprimary
sleep 5
mv machine/machine-1 machine/machine-1-down
@@ -58,14 +69,15 @@ mkdir -p machine/machine-1/db
touch machine/machine-1/db/index
touch machine/machine-1/db/newentries
-tests_start
+tests_start mergesecondary storage frontend mergeprimary
-do_merge 2> bench-3 || (tests_stop ; fail "Merge failed")
+do_merge 10000 || (tests_stop ; fail "Merge failed")
+wait_for_equal "Tree size" "${top_srcdir}/tools/mergestatus.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg" "10000 10000 10000" 400
check_sth || (tests_stop ; fail "Check STH failed")
sleep 5
-tests_stop
+tests_stop_all
sleep 5
-grep timing: bench-[123] > bench.txt
-${top_srcdir}/tools/parsebench.py bench.txt > bench.html
+#grep timing: bench-[123] > bench.txt
+#${top_srcdir}/tools/parsebench.py bench.txt > bench.html