Last active
May 10, 2022 15:36
-
-
Save makotom/e7ba718095998635f79ac55f935dd9e1 to your computer and use it in GitHub Desktop.
Multi-session ndt7
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 | |
MAX_ITER=16 | |
RESULT_DIR="$(mktemp -d -p ./)" | |
for iter in $(seq 1 "${MAX_ITER}"); do | |
./ndt7-client >"${RESULT_DIR}/${iter}" & | |
done | |
until [[ "$(jobs | grep -c Running)" -eq 0 ]]; do | |
sleep 1 | |
done | |
echo -n 'Download: ' | |
cat "./${RESULT_DIR}/"* | grep Download | awk '{ s += $2 } END { print s }' | |
echo -n 'Upload: ' | |
cat "./${RESULT_DIR}/"* | grep Upload | awk '{ s += $2 } END { print s }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment