Spidy
A fast, customizable CLI tool for testing your internet connection speed using Cloudflare's speed test infrastructure.
Features
- Download & Upload Speed Testing - Measure both download and upload speeds with configurable test sizes
- Latency & Jitter Metrics - Track network latency and jitter for both directions
- Statistical Analysis - Automatic calculation of percentiles (75th, 90th), median latency, and jitter
- Customizable Tests - Define custom test configurations with specific sizes and iterations
- Multiple Output Formats - Results in human-readable text or JSON format
- Location & ISP Info - Displays server location, ASN, and your IP information
- Progress Tracking - Real-time progress bar showing test completion
Installation
From Source
From crates.io
Usage
Basic Usage
Run with default test configuration:
Custom Tests
Define custom tests using the --test or -t flag:
Test format: <direction>=<size>=<iterations>
- Direction:
d/downfor download,u/upfor upload - Size: Human-readable format (e.g.,
100kB,1MB,10MB,100MB) - Iterations: Number of times to run each test
Output Formats
Text output (default):
JSON output:
Examples
# Quick test with smaller files
# Heavy download test
# Upload-focused test
# Get JSON output for parsing
Default Test Configuration
If no tests are specified, the following default configuration is used:
- Download 100kB × 10 iterations
- Download 1MB × 8 iterations
- Upload 100kB × 8 iterations
- Upload 1MB × 6 iterations
- Download 10MB × 6 iterations
- Upload 10MB × 4 iterations
- Download 25MB × 4 iterations
- Download 100MB x 3 iterations
Output
Text Format
CLOUDFLARE SPEED TEST CLI
=========================
Server Location: San Francisco - US
ASN: 13335 (Cloudflare, Inc.)
Your IP: xxx.xxx.xxx.xxx
Completed 8/8 tests in 42.46s
Latency details
Min: 116.00 ms
Max: 188.00 ms
Average: 138.15 ms
Median: 131.00 ms
Jitter: 22.05 ms
90th Percentile: 170.20 ms
75th Percentile: 143.50 ms
Download details:
(10/10) 100kB 233.33 Mbps
(8/8) 1MB 59.26 Mbps
(6/6) 10MB 164.67 Mbps
(4/4) 25MB 194.37 Mbps
Download Latency (Median): 131.50 ms
Download Jitter: 26.36 ms
Overall Download:
90th Percentile: 306.67 Mbps
75th Percentile: 200.15 Mbps
Upload details:
(8/8) 100kB 2.74 Mbps
(6/6) 1MB 18.32 Mbps
(4/4) 10MB 38.60 Mbps
Upload Latency (Median): 145.00 ms
Upload Jitter: 306.38 ms
Overall Upload:
90th Percentile: 38.18 Mbps
75th Percentile: 24.39 Mbps
JSON Format
The JSON output includes:
- Individual test results with all measurements
- Aggregated statistics (percentiles, median latency, jitter)
- Server metadata (location, ASN, IP information)
- Latency stats
How It Works
Spidy uses Cloudflare's speed test infrastructure to measure your internet connection:
- Metadata Request - Retrieves information about the nearest Cloudflare server and your connection
- Download Tests - Downloads data from
https://speed.cloudflare.com/__down?bytes=<size> - Upload Tests - Uploads data to
https://speed.cloudflare.com/__up - Metrics Calculation:
- Speed: Calculated from transfer size and transfer time (excluding TTFB)
- Latency: Time to first byte minus server processing time
- Jitter: Average absolute difference between consecutive latency measurements
- Percentiles: Statistical distribution of all speed measurements
Proxy Support
Spidy does not have proxy-related command line flags by design. The tool uses libcurl under the hood, which automatically respects standard proxy environment variables:
HTTP_PROXY/http_proxyHTTPS_PROXY/https_proxy
To use a proxy, simply set the appropriate environment variable:
This approach keeps the CLI simple and allows users to run spidy without specifying any flags.
License
See LICENSE for details.