Created
June 5, 2020 01:41
-
-
Save fogti/95a066cfef984a4952282cd8758b105f to your computer and use it in GitHub Desktop.
a simple yz-encsess2 stress test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export RUST_LOG=debug | |
# source repo @ https://github.com/YZITE/encsess2 | |
# git clone https://github.com/YZITE/encsess2 | |
# cd encsess2 | |
# cargo build --release | |
YZESD2PATH=... # should point at the path where the release binaries reside | |
echo "spawn server ..." | |
"${YZESD2PATH}/yzesd2-server" --privkey 1QDGxqyyptm60lrwVUII/mr9w8hWn3G2+3lW3ZAr3JA= --listen 127.0.0.1:9999 &> ~/yzesdserv.log & pid_server=$! | |
sleep 0.2 | |
echo "run clients ..." | |
( | |
yes | "${YZESD2PATH}/yzesd2-client" --remote-pubkey 3sxb4IPqutINTvsgpyz2df4KNWE2NoADE9B++I6TrDw= --connect '127.0.0.1:9999' & pid1=$! | |
sleep 0.1 | |
yes | "${YZESD2PATH}/yzesd2-client" --remote-pubkey 3sxb4IPqutINTvsgpyz2df4KNWE2NoADE9B++I6TrDw= --connect '127.0.0.1:9999' & pid2=$! | |
sleep 0.5 | |
kill $pid1 $pid2 | |
) &> ~/yzesdclients.log | |
echo "shutting down ..." | |
kill $pid_server | |
# now hope that this stresstest produced some fresh new error condition examples ;-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment