mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-11-11 01:10:06 +05:30
refactor: add check for 'shuf' inside 'check_command' function
This commit is contained in:
parent
0aa21fff5e
commit
fdf136e464
1 changed files with 52 additions and 48 deletions
4
yabs.sh
4
yabs.sh
|
|
@ -786,6 +786,7 @@ function iperf_test {
|
|||
|
||||
# attempt the iperf send test 3 times, allowing for a slot to become available on the
|
||||
# server or to throw out any bad/error results
|
||||
if check_command "shuf"; then
|
||||
I=1
|
||||
while [ $I -le 3 ]
|
||||
do
|
||||
|
|
@ -836,6 +837,9 @@ function iperf_test {
|
|||
fi
|
||||
echo -en "\r\033[0K"
|
||||
done
|
||||
else
|
||||
echo -e "\nWarning: 'shuf' command not found. Skipping iperf network tests..."
|
||||
fi
|
||||
|
||||
# Run a latency test via ping -c1 command -> will return "xx.x ms"
|
||||
[[ -n $LOCAL_PING ]] && LATENCY_RUN="$(ping -c1 "$URL" 2>/dev/null | grep -o 'time=.*' | sed s/'time='//)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue