summaryrefslogtreecommitdiff
path: root/test/scripts/perf-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/perf-test.sh')
-rwxr-xr-xtest/scripts/perf-test.sh53
1 files changed, 30 insertions, 23 deletions
diff --git a/test/scripts/perf-test.sh b/test/scripts/perf-test.sh
index 3766cf1..51e719c 100755
--- a/test/scripts/perf-test.sh
+++ b/test/scripts/perf-test.sh
@@ -18,66 +18,73 @@ tests_stop() {
}
tests_stop_all() {
- ${SCRIPTS}/light-system-test-stop.sh mergeprimary mergesecondary frontend storage signing
+ ${SCRIPTS}/light-system-test-stop.sh mergeprimary mergesecondary frontend 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
+${top_srcdir}/tools/initlog.py --config machine/merge-1/catlfish-test.cfg --localconfig machine/merge-1/catlfish-test-local-merge-1.cfg
cp ${top_srcdir}/test/known_roots/* known_roots
tests_start signing
-tests_start mergesecondary storage frontend mergeprimary
+tests_start merge_2only frontendexceptlast mergeprimary
do_merge 0
check_sth
assert_equal "Tree size" "$(get_treesize)" 0
-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")
+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 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
+python ${top_srcdir}/tools/storagegc.py --config machine/machine-1/catlfish-test.cfg --localconfig machine/machine-1/catlfish-test-local-1.cfg || fail "GC failed" &
+python ${top_srcdir}/tools/storagegc.py --config machine/machine-1/catlfish-test.cfg --localconfig machine/machine-2/catlfish-test-local-2.cfg || fail "GC failed" &
+
+wait_for_equal "Tree size" "${top_srcdir}/tools/mergestatus.py --config machine/merge-1/catlfish-test.cfg --localconfig current-merge-localconfig.cfg" "10000 10000 10000" 400
+
sleep 5
-tests_stop mergesecondary storage frontend mergeprimary
+tests_stop merge_2only mergeprimary
sleep 5
-mv mergedb mergedb-down
-mv mergedb-secondary mergedb
-mkdir mergedb-secondary
-touch mergedb-secondary/logorder
-printf 0 > mergedb-secondary/verifiedsize
+${top_srcdir}/tools/genconfig.sh ${top_srcdir}/test/catlfish-test-mergefailover.cfg.in privatekeys keys/logkey.pem httpsca/demoCA/cacert.pem ${top_srcdir}/test/logadminkey-private.pem catlfish-test-generated.cfg
+${top_srcdir}/test/scripts/reload-config.sh
+${SCRIPTS}/light-system-test-prepare-merge-takeover.sh
-${top_srcdir}/tools/initlog.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg --promote-secondary
+tests_start mergeprimary merge_3only
-tests_start mergesecondary storage frontend mergeprimary
+python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/tools/testcerts/cert1.txt --check-sct --sct-file=submittedcerts ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Submission failed"
-do_merge 10000 || (tests_stop ; fail "Merge failed")
+do_merge 10001 || (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
+
+wait_for_equal "Tree size" "${top_srcdir}/tools/mergestatus.py --config machine/merge-1/catlfish-test.cfg --localconfig current-merge-localconfig.cfg" "10001 10001 10001" 400
+
sleep 5
-tests_stop mergesecondary storage frontend mergeprimary
+tests_stop mergesecondary frontendexceptlast mergeprimary
sleep 5
+${top_srcdir}/tools/genconfig.sh ${top_srcdir}/test/catlfish-test-redistribute-frontend.cfg.in privatekeys keys/logkey.pem httpsca/demoCA/cacert.pem ${top_srcdir}/test/logadminkey-private.pem catlfish-test-generated.cfg
+${top_srcdir}/test/scripts/reload-config.sh
-mv machine/machine-1 machine/machine-1-down
-mkdir -p machine/machine-1/db
-touch machine/machine-1/db/index
-touch machine/machine-1/db/newentries
+. ${top_srcdir}/test/test.shvars
-tests_start mergesecondary storage frontend mergeprimary
+tests_start mergesecondary frontendexceptfirst mergeprimary
-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
+python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/tools/testcerts/cert2.txt --check-sct --sct-file=submittedcerts https://localhost:8090/ --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Submission failed"
+
+do_merge 10002 || (tests_stop ; fail "Merge failed")
+wait_for_equal "Tree size" "${top_srcdir}/tools/mergestatus.py --config machine/merge-1/catlfish-test.cfg --localconfig current-merge-localconfig.cfg" "10002 10002 10002" 800
check_sth || (tests_stop ; fail "Check STH failed")
sleep 5
tests_stop_all
sleep 5
+echo Success
+
#grep timing: bench-[123] > bench.txt
#${top_srcdir}/tools/parsebench.py bench.txt > bench.html