Fix: Restore compare_rsync.sh from corrupted merge, add benchmark_network.sh

- Fix compare_rsync.sh: Remove merge conflict markers from commit 43701a4
  and properly integrate LAN/WAN latency simulation (--lan, --wan presets)
- Add benchmark_network.sh: New dedicated network condition benchmark with:
  - LAN scenario (10ms RTT)
  - WAN scenario (100ms RTT)
  - WAN with packet loss (1%, 5%, 10%)
  - WAN with jitter (100ms +/-50ms)
  - Custom latency support
  - Tests connection counts 1, 2, 4, 8, 16 under each scenario
  - ASCII bar chart visualization
  - Identifies best connection count per scenario

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
taptap
2026-06-24 13:23:23 +02:00
parent 792a85099f
commit 7f7c06eaa4
2 changed files with 371 additions and 55 deletions
+2 -55
View File
@@ -1,30 +1,3 @@
# compare_rsync.sh — Compare fastSyncAI performance against rsync
#
# Usage:
# ./compare_rsync.sh [DATA_SIZE_MB] [RUN_COUNT]
#
# Examples:
# ./compare_rsync.sh # 100 MB, 3 runs (default)
# ./compare_rsync.sh 500 # 500 MB, 3 runs
# ./compare_rsync.sh 100 5 # 100 MB, 5 runs
#
# Tests:
# - Small files (many files, 256KB each)
# - Medium files (fewer files, 1-5MB each)
# - Large single file
# - Mixed directory structure
#
# Compares: fastSyncAI (TCP, multi-connection) vs rsync vs rsync with compression
# =============================================================================
set -euo pipefail
# ── Defaults ──────────────────────────────────────────────────────────────
DATA_SIZE_MB=${1:-100}
RUN_COUNT=${2:-3}
PORT=19199
HOST="127.0.0.1"
=======
#!/usr/bin/env bash
# =============================================================================
# compare_rsync.sh — Compare fastSyncAI performance against rsync
@@ -75,32 +48,6 @@ if [ $# -ge 3 ]; then
esac
fi
PORT=19199
HOST="127.0.0.1"=============================================================================
# compare_rsync.sh — Compare fastSyncAI performance against rsync
#
# Usage:
# ./compare_rsync.sh [DATA_SIZE_MB] [RUN_COUNT]
#
# Examples:
# ./compare_rsync.sh # 100 MB, 3 runs (default)
# ./compare_rsync.sh 500 # 500 MB, 3 runs
# ./compare_rsync.sh 100 5 # 100 MB, 5 runs
#
# Tests:
# - Small files (many files, 256KB each)
# - Medium files (fewer files, 1-5MB each)
# - Large single file
# - Mixed directory structure
#
# Compares: fastSyncAI (TCP, multi-connection) vs rsync vs rsync with compression
# =============================================================================
set -euo pipefail
# ── Defaults ──────────────────────────────────────────────────────────────
DATA_SIZE_MB=${1:-100}
RUN_COUNT=${2:-3}
PORT=19199
HOST="127.0.0.1"
@@ -387,9 +334,9 @@ done
# ── Print summary ────────────────────────────────────────────────────────────
echo ""
echo -e "${BOLD}═══════════════════════════════════════════════════════════════${RESET}"
echo -e "${BOLD}════════════════════════════════════════════════════════════════════════╗${RESET}"
echo -e "${BOLD} SUMMARY${RESET}"
echo -e "${BOLD}═══════════════════════════════════════════════════════════════${RESET}"
echo -e "${BOLD}════════════════════════════════════════════════════════════════════════╝${RESET}"
echo ""
# Parse all results