Production-grade, cross-platform Network Benchmarking and Diagnostics CLI suite in Python 3.
Works seamlessly on Linux (Ubuntu, Debian, Fedora, Arch) and Windows 10/11 without requiring elevated/root privileges.
- Tier-1 Global Endpoints: Benchmarks against major European & Transcontinental Internet Exchange Points (IXPs) and Tier-1 CDNs/Backbones (Milan MIX, Rome NAMEX, Telecom Italia, Frankfurt DE-CIX, Paris OVH, London LINX, Amsterdam AMS-IX, US-East Ashburn, Tokyo TY2, Singapore Hub).
- Comprehensive Latency & Jitter:
- Measures Minimum, Average, Maximum, Median, and Standard Deviation.
- Computes RFC 3393 Inter-Arrival Jitter and Packet Loss percentage.
- Automatically falls back to high-precision TCP handshake timing if ICMP ping is restricted or blocked.
- Hop-by-Hop Route Analysis (Traceroute):
- Cross-platform parser for Windows
tracertand Linuxtraceroute/tracepath. - Analyzes national Italian routes (Milan MIX) and European transit hubs (Frankfurt DE-CIX).
- Cross-platform parser for Windows
- Throughput & Bufferbloat Evaluation:
- Multi-stream chunked HTTP download and upload speed test against high-capacity Tier-1 CDN endpoints.
- Continuous concurrent loaded latency sampling to calculate RFC bufferbloat grades (A+, A, B, C, D, F).
- Automated Logging & Structured Artifacts:
- Automatically exports raw machine-readable JSON (
benchmark_<timestamp>.json). - Automatically generates human-readable ASCII text reports (
benchmark_<timestamp>.txt).
- Automatically exports raw machine-readable JSON (
- Differential Comparison Engine (
--compare):- Compares two benchmark JSON runs and displays calculated deltas (e.g.
+25.3 Mbps down,-2.4 ms latency,-0.4 ms jitter).
- Compares two benchmark JSON runs and displays calculated deltas (e.g.
- Zero Mandatory Dependencies:
- Runs out of the box using only the Python 3 standard library.
- Optional
richintegration for enhanced terminal styling.
NetBench requires Python 3.8+ and no mandatory third-party libraries.
# Clone or navigate to the repository
cd full_internet_test
# (Optional) Install rich for enhanced terminal colors and formatting
pip install -r requirements.txt1. Run Comprehensive Benchmark Suite
python benchmark.py2. Run Quick Mode (5 pings, 4-second throughput)
python benchmark.py --quick3. Targeted Diagnostics
# Run only latency & jitter tests
python benchmark.py --latency-only
# Run only download/upload throughput and bufferbloat
python benchmark.py --throughput-only
# Run only traceroutes
python benchmark.py --traceroute-only4. Custom Endpoints & Concurrency
# Test custom endpoints
python benchmark.py --targets "1.1.1.1,8.8.8.8,google.com,fsn1-speed.hetzner.com"
# Specify custom stream count and test duration
python benchmark.py --throughput-only --streams 8 --duration 155. Compare Historical Runs
python benchmark.py --compare benchmark_20260826_120000.json benchmark_20260826_140000.json| Flag | Description |
|---|---|
--quick |
Fast diagnostic run (5 packets, 4s throughput). |
--full |
Full comprehensive benchmark (default). |
--latency-only |
Run only latency, jitter, and packet loss diagnostics. |
--throughput-only |
Run only download/upload bandwidth and bufferbloat tests. |
--traceroute-only |
Run only hop-by-hop route diagnostics. |
--compare FILE1 FILE2 |
Compare two JSON benchmark runs and print deltas. |
--targets HOSTS |
Comma-separated list of target IPs or domains. |
--streams N |
Parallel HTTP streams for throughput testing (default: 4). |
--duration SEC |
Duration for throughput test phases (default: 10s). |
--pings N |
Number of ICMP/TCP ping packets per target (default: 15). |
--output-dir DIR |
Destination directory for output files (default: .). |
--no-save |
Do not write .json and .txt files to disk. |
--no-color |
Disable ANSI and Rich formatting. |
--json-only |
Output raw JSON data directly to standard output. |
- Italy / Local:
1.1.1.1(Milan MIX / Cloudflare Anycast)104.16.0.0(Milan Cloudflare Edge Gateway)8.8.8.8(Rome NAMEX / Google Primary DNS)85.37.17.51(Telecom Italia Gateway / DNS)
- Europe:
fsn1-speed.hetzner.com(Frankfurt DE-CIX / Hetzner Core Hub)proof.ovh.net(Paris / OVH Core Backbone)1.0.0.1(London LINX / Cloudflare UK)8.8.4.4(Amsterdam AMS-IX / Google Edge)
- Global / Transcontinental:
speedtest.newyork.linode.com(US-East Ashburn / AWS Linode)speedtest.tokyo2.linode.com(Tokyo Asia-East / Equinix TY2)speedtest.singapore.linode.com(Singapore SEA Transit Hub)
NetBench includes a complete unit test suite using the standard Python unittest framework:
python -m unittest discover tests -v- Endpoint globali Tier-1: benchmark verso i principali Internet Exchange Point (IXP) europei e transcontinentali e verso CDN/backbone Tier-1 (Milano MIX, Roma NAMEX, Telecom Italia, Francoforte DE-CIX, Parigi OVH, Londra LINX, Amsterdam AMS-IX, US-East Ashburn, Tokyo TY2, Singapore Hub).
- Latenza e jitter completi:
- Misura minimo, medio, massimo, mediana e deviazione standard.
- Calcola il Jitter Inter-Arrival RFC 3393 e la percentuale di pacchetti persi.
- Fallback automatico al timing ad alta precisione dell'handshake TCP se il ping ICMP è bloccato o limitato.
- Analisi hop-by-hop del percorso (Traceroute):
- Parser cross-platform per
tracert(Windows) etraceroute/tracepath(Linux). - Analizza rotte nazionali italiane (Milano MIX) e hub di transito europei (Francoforte DE-CIX).
- Parser cross-platform per
- Valutazione throughput e bufferbloat:
- Test di velocità download/upload HTTP multi-stream verso endpoint CDN Tier-1 ad alta capacità.
- Campionamento continuo della latenza sotto carico per calcolare i voti di bufferbloat secondo RFC (A+, A, B, C, D, F).
- Logging automatico e artefatti strutturati:
- Esportazione automatica di JSON grezzo leggibile da macchina (
benchmark_<timestamp>.json). - Generazione automatica di report ASCII leggibili da persone (
benchmark_<timestamp>.txt).
- Esportazione automatica di JSON grezzo leggibile da macchina (
- Motore di confronto differenziale (
--compare):- Confronta due run di benchmark in JSON e mostra i delta calcolati (es.
+25.3 Mbps down,-2.4 ms latenza,-0.4 ms jitter).
- Confronta due run di benchmark in JSON e mostra i delta calcolati (es.
- Zero dipendenze obbligatorie:
- Funziona out of the box usando solo la libreria standard di Python 3.
- Integrazione opzionale con
richper una formattazione avanzata del terminale.
NetBench richiede Python 3.8+ e nessuna libreria di terze parti obbligatoria.
# Clona o naviga nel repository
cd full_internet_test
# (Opzionale) Installa rich per colori e formattazione avanzata del terminale
pip install -r requirements.txt1. Esegui la suite di benchmark completa
python benchmark.py2. Modalità rapida (5 ping, 4 secondi di throughput)
python benchmark.py --quick3. Diagnostica mirata
# Esegui solo i test di latenza e jitter
python benchmark.py --latency-only
# Esegui solo i test di throughput download/upload e bufferbloat
python benchmark.py --throughput-only
# Esegui solo i traceroute
python benchmark.py --traceroute-only4. Endpoint personalizzati e concorrenza
# Testa endpoint personalizzati
python benchmark.py --targets "1.1.1.1,8.8.8.8,google.com,fsn1-speed.hetzner.com"
# Specifica un numero personalizzato di stream e durata del test
python benchmark.py --throughput-only --streams 8 --duration 155. Confronta run storici
python benchmark.py --compare benchmark_20260826_120000.json benchmark_20260826_140000.json| Flag | Descrizione |
|---|---|
--quick |
Esecuzione diagnostica rapida (5 pacchetti, 4s di throughput). |
--full |
Benchmark completo (predefinito). |
--latency-only |
Esegue solo la diagnostica di latenza, jitter e packet loss. |
--throughput-only |
Esegue solo i test di banda download/upload e bufferbloat. |
--traceroute-only |
Esegue solo la diagnostica hop-by-hop del percorso. |
--compare FILE1 FILE2 |
Confronta due run di benchmark JSON e stampa i delta. |
--targets HOSTS |
Elenco separato da virgole di IP o domini target. |
--streams N |
Stream HTTP paralleli per il test di throughput (predefinito: 4). |
--duration SEC |
Durata delle fasi di test throughput (predefinito: 10s). |
--pings N |
Numero di pacchetti ICMP/TCP ping per target (predefinito: 15). |
--output-dir DIR |
Directory di destinazione per i file di output (predefinito: .). |
--no-save |
Non scrive i file .json e .txt su disco. |
--no-color |
Disabilita la formattazione ANSI e Rich. |
--json-only |
Stampa i dati JSON grezzi direttamente su standard output. |
- Italia / Locale:
1.1.1.1(Milano MIX / Cloudflare Anycast)104.16.0.0(Milano Cloudflare Edge Gateway)8.8.8.8(Roma NAMEX / Google DNS primario)85.37.17.51(Telecom Italia Gateway / DNS)
- Europa:
fsn1-speed.hetzner.com(Francoforte DE-CIX / Hetzner Core Hub)proof.ovh.net(Parigi / OVH Core Backbone)1.0.0.1(Londra LINX / Cloudflare UK)8.8.4.4(Amsterdam AMS-IX / Google Edge)
- Globale / Transcontinentale:
speedtest.newyork.linode.com(US-East Ashburn / AWS Linode)speedtest.tokyo2.linode.com(Tokyo Asia-East / Equinix TY2)speedtest.singapore.linode.com(Singapore SEA Transit Hub)
NetBench include una suite completa di unit test basata sul framework standard unittest di Python:
python -m unittest discover tests -v