Commit graph

2 commits

Author SHA1 Message Date
google-labs-jules[bot]
dc07077abd ⚡ fix: refactor ping_samples_win to be asynchronous to avoid thread pool blocking
By converting `ping_samples_win` from a synchronous function that blocks with `time.sleep` into an async function using `await asyncio.sleep()`, we prevent thread-pool exhaustion during heavy concurrent ICMP sweeps. Only the strictly blocking Windows ICMP API call (`echo_once`) is delegated to a background thread.

Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
2026-09-04 07:23:48 +00:00
Horizontal42
c3d44486ce
Add test suite for netsleuth.probes.latency (#16)
Creates `tests/test_latency.py` providing test coverage for `src/netsleuth/probes/latency.py`. Validates ICMP sampling (both Unix and Windows), TCP fallback logic, address resolution, orchestration (`ping_host`, `ping_fanout`), and summary statistics calculation. Uses pytest-asyncio and unittest.mock for testing async concurrent network flows.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-08-19 17:17:26 +03:00