Fix compression implementation and reduce benchmark timeouts
- Revert streaming compression to non-streaming approach (fixes decompression errors) - Reduce client timeout in benchmark from 600s to 60s - Simplify wait time calculation in benchmark to fixed 2s Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -233,19 +233,14 @@ run_fastsync() {
|
||||
local output
|
||||
local compress_flag=""
|
||||
[ "$use_compress" -eq 0 ] && compress_flag="-c"
|
||||
output=$(timeout 600 "$CLIENT_BIN" -h "$HOST" -p "$port" -s "$SRC_DIR" -n "$nconn" $compress_flag 2>&1) || true
|
||||
output=$(timeout 60 "$CLIENT_BIN" -h "$HOST" -p "$port" -s "$SRC_DIR" -n "$nconn" $compress_flag 2>&1) || true
|
||||
|
||||
# Extract actual transfer time from client output
|
||||
local transfer_ms=$(echo "$output" | grep -oP 'ms=\K[0-9.]+' || echo "0")
|
||||
local transfer_ms_int=$(echo "$transfer_ms" | awk '{printf "%d", $1+0}')
|
||||
|
||||
# Aggressive wait times for quick progress checks
|
||||
# Formula: max(transfer_time/1000 + 1s, 1s) + 1s extra for 1 conn
|
||||
local wait_time=$(( transfer_ms_int / 1000 + 1 ))
|
||||
[ "$nconn" -eq 1 ] && wait_time=$(( wait_time + 1 ))
|
||||
[ "$wait_time" -lt 1 ] && wait_time=1
|
||||
|
||||
sleep $wait_time
|
||||
# Use fixed short wait time since timeout already limits client
|
||||
sleep 2
|
||||
kill "$spid" 2>/dev/null || true
|
||||
wait "$spid" 2>/dev/null || true
|
||||
sync
|
||||
|
||||
Reference in New Issue
Block a user