Skip to main content

Crate netspeed_cli

Crate netspeed_cli 

Source
Expand description

§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.)

Modules§

bandwidth_loop
Shared bandwidth measurement loop for download/upload tests.
cli
common
Common shared utilities used across download, upload, formatting, and progress modules.
config
download
Multi-stream download bandwidth measurement.
error
formatter
Output formatting for speed test results.
history
http
orchestrator
Orchestrates the full speed test lifecycle.
progress
Terminal progress bars and spinners for test feedback.
servers
test_runner
Test runner orchestration for download and upload bandwidth tests.
types
upload
Multi-stream upload bandwidth measurement.