1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! # netspeed-cli
//!
//! A command-line internet bandwidth tester using speedtest.net servers.
//!
//! ## Overview
//!
//! This crate provides both a library and a binary (`netspeed-cli`) for
//! measuring download speed, upload speed, latency, jitter, and latency
//! under load. It connects to speedtest.net's server infrastructure to
//! perform real-world bandwidth tests.
//!
//! ## Modules
//!
//! - [`cli`] — Command-line argument parsing with clap
//! - [`common`] — Shared utilities (bandwidth calculation, formatting, validation)
//! - [`config`] — Configuration merging (CLI args + config file)
//! - [`download`] — Multi-stream download bandwidth measurement
//! - [`upload`] — Multi-stream upload bandwidth measurement
//! - [`error`] — Unified error types
//! - [`formatter`] — Output formatting (detailed, simple, JSON, CSV)
//! - [`history`] — Persistent test result history
//! - [`http`] — HTTP client creation and IP discovery
//! - [`progress`] — Terminal progress bars and spinners
//! - [`servers`] — Server discovery, distance calculation, and selection
//! - [`test_runner`] — Test orchestration with template method pattern
//! - [`types`] — Shared data structures (Server, TestResult, etc.)