fix(benchmark): Remove local keywords from UDP test loop
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -371,21 +371,20 @@ if [ "$PACKET_LOSS" = "0%" ] || [ "$PACKET_LOSS" = "0.1%" ]; then
|
||||
for i in "${!UDP_CONN_COUNTS[@]}"; do
|
||||
n=${UDP_CONN_COUNTS[$i]}
|
||||
echo -n " ${UDP_LABELS[$i]}... "
|
||||
local dst="$DST_DIR_BASE/udp_${n}"
|
||||
local port=$((FASTSYNC_PORT + 100 + n))
|
||||
dst="$DST_DIR_BASE/udp_${n}"
|
||||
port=$((FASTSYNC_PORT + 100 + n))
|
||||
rm -rf "$dst"
|
||||
mkdir -p "$dst"
|
||||
|
||||
"$SERVER_BIN" -p "$port" -d "$dst" >/dev/null 2>&1 &
|
||||
local spid=$!
|
||||
spid=$!
|
||||
sleep 1
|
||||
|
||||
local output
|
||||
output=$(timeout 600 "$CLIENT_BIN" -h "$HOST" -p "$port" -s "$SRC_DIR" -n "$n" -u 2>&1) || true
|
||||
|
||||
local ms=$(echo "$output" | grep -oP 'ms=\K[0-9.]+' || echo "0")
|
||||
local mbs=$(echo "$output" | grep -oP 'throughput_mbs=\K[0-9.]+' || echo "0")
|
||||
local ok=1
|
||||
ms=$(echo "$output" | grep -oP 'ms=\K[0-9.]+' || echo "0")
|
||||
mbs=$(echo "$output" | grep -oP 'throughput_mbs=\K[0-9.]+' || echo "0")
|
||||
ok=1
|
||||
verify "$SRC_DIR" "$dst" || ok=0
|
||||
echo "${ms}|${mbs}|${ok}"
|
||||
UDP_RES+=("${ms}|${mbs}|${ok}")
|
||||
|
||||
Reference in New Issue
Block a user