Skip to content

Instantly share code, notes, and snippets.

@makotom
Last active May 10, 2022 15:36
Show Gist options
  • Save makotom/e7ba718095998635f79ac55f935dd9e1 to your computer and use it in GitHub Desktop.
Save makotom/e7ba718095998635f79ac55f935dd9e1 to your computer and use it in GitHub Desktop.
Multi-session ndt7
#!/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