Compare commits
2 commits
1a9174eb6c
...
89dd1e030e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
89dd1e030e | ||
![]() |
df05194b3b |
1 changed files with 12 additions and 2 deletions
14
runtest.sh
14
runtest.sh
|
@ -184,11 +184,21 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
|
|||
bssid_and_bitrate=$(iw dev "$INTERFACE" link | awk '/Connected/ {bssid=$3} /tx bitrate/ {tx=$3} /rx bitrate/ {rx=$3} END {print bssid","tx","rx}')
|
||||
|
||||
speed_results=""
|
||||
speedtest_duration=0
|
||||
localtcpup_duration=0
|
||||
localtcpdown_duration=0
|
||||
localudpup_duration=0
|
||||
localudpdown_duration=0
|
||||
remotetcpup_duration=0
|
||||
remotetcpdown_duration=0
|
||||
remoteudpup_duration=0
|
||||
remoteudpdown_duration=0
|
||||
|
||||
for ((retry = 1; retry <= MAX_RETRIES; retry++)); do
|
||||
SECONDS=0
|
||||
log "Speed test attempt $retry"
|
||||
speed_results=$(speedtest --secure --csv 2>/dev/null || true)
|
||||
$speedtest_duration=$SECONDS
|
||||
speedtest_duration=$SECONDS
|
||||
[[ -n "$speed_results" ]] && break
|
||||
warn "Speedtest failed. Retrying in $RETRY_DELAY seconds..."
|
||||
echo "$(date -Iseconds),Speedtest failed on attempt $retry for test $COUNTER, sample $i" >> "$FAILURE_LOG"
|
||||
|
@ -199,7 +209,7 @@ for ((COUNTER = 1; COUNTER <= NUM_TESTS; COUNTER++)); do
|
|||
timestamp=$(date -Iseconds)
|
||||
warn "Speedtest permanently failed. Skipping sample."
|
||||
echo "$timestamp,Test $COUNTER,Sample $i" >>"$FAILURE_LOG"
|
||||
$speedtest_duration=$SECONDS
|
||||
speedtest_duration=$SECONDS
|
||||
continue
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue