Skip to content

SwiftFTR v0.5.2

Choose a tag to compare

@dweekly dweekly released this 03 Oct 19:25
· 248 commits to main since this release

Performance Improvements

Parallel Ping Execution (6.4x speedup)

  • FIXED: ping() now runs in parallel, not serially
  • Changed ping() from actor-isolated to nonisolated method
  • Changed internal PingExecutor from actor to struct
  • Multiple concurrent ping() calls now execute truly in parallel

Benchmark Results

  • Before: 20 concurrent pings would take ~7.2s (serialized)
  • After: 20 concurrent pings take ~1.1s (parallel, 7ms spread)
  • Speedup: 6.4x

Test Results

  • 18/20 pings to Tanzania: 361-362ms RTT (1.3ms variance)
  • Completion spread: 7ms (proves true parallelism)
  • Added PingParallelismTests with high-RTT target validation

Technical Details

  • PingExecutor converted to struct (no mutable state, doesn't need actor isolation)
  • Each ping operation creates its own socket for true independence
  • ResponseCollector remains actor for thread-safe response handling
  • No breaking changes to public API

Testing

  • All 45 tests passing
  • New parallelism test validates concurrent execution with <500ms spread