Ted Mwai
All works
Networking & Developer ToolsDOM-NETSeptember 2026

SpeedMyNet CLI & Network Monitor

High-precision telemetry tool for bandwidth, bufferbloat, and latency profiling

±0.4ms
Measurement Accuracy
6.2 MB
Binary Footprint
< 8s
CLI Execution

How measured · Timing precision (±0.4ms) verified against local loopback and Linux tc-netem controlled jitter injection baselines; binary size (6.2 MB) and CLI completion (< 8s) measured on stripped Go builds across macOS and Linux.

GoCLIWebSocketsPrometheusNetwork Telemetry
Executive summary
DOSSIER // TL;DR

Peak download numbers from standard speed tests hide why SSH sessions lag or calls drop during heavy uplinks. SpeedMyNet measures latency under load in a single 6.2 MB Go binary and exports time-series telemetry for Prometheus.

Outcome

Profiles loaded bufferbloat, packet jitter, and multi-hop stability with ±0.4ms precision in under 8 seconds.

Method

Lightweight 6.2 MB compiled Go CLI and companion WebSocket visualizer streaming microsecond-accurate TCP/UDP socket stages with Prometheus metrics.

Problem

Conventional browser speed tests optimize for a single vanity metric—peak download throughput—while ignoring bufferbloat (latency spikes when router queues saturate under concurrent upload/download load). Engineers troubleshooting sluggish SSH sessions, dropped WebRTC audio, or VPN tunnel instability during large git push or container-image uploads needed deterministic, scriptable loaded-latency diagnostics without browser overhead.

Constraints

  • Zero Runtime Bloat: Had to ship as a single static binary (< 10 MB) with zero external runtime dependencies for quick deployment on Linux jump hosts, edge routers, and developer laptops.
  • Measurement Fidelity: Garbage-collection pauses or UI rendering stalls could not skew sub-millisecond socket round-trip timestamps.
  • High-Frequency UI Streaming: The companion live browser dashboard had to ingest up to 2,500 packet-telemetry events per second over WebSockets without dropping below 60fps.

My Contribution

I designed and implemented the Go probe engine, built the staged unloaded-vs-loaded latency scheduler, added the Prometheus metrics exporter mode, and re-architected the WebSocket dashboard rendering pipeline to eliminate layout thrashing.

Architecture

  1. Three-Phase Probe Pipeline (Go):
    • Baseline Idle Phase: Samples unloaded ICMP/TCP handshake RTT and baseline jitter using monotonic clock timestamps.
    • Saturated Load Phase: Opens bounded worker pools to saturate downlink and uplink channels while concurrently running a dedicated latency-probe goroutine on an isolated socket to quantify queue-induced bufferbloat delta.
    • Path Stability & Daemon Exporter: Exposes /metrics histograms (rtt_idle_ms, rtt_loaded_ms, jitter_p99_ms, packet_loss_ratio) for Prometheus and Grafana alerting.
  2. Decoupled WebSocket Visualizer:
    • Ingests raw socket frames into a fixed-size TypedArray circular ring buffer and flushes DOM/SVG path updates strictly on requestAnimationFrame ticks rather than per-packet callbacks.

Verification

  • Controlled tc-netem Calibration: Validated reported RTT and jitter deltas against deterministic Linux tc qdisc netem delay 25ms 4ms traffic-shaping rules, confirming ±0.4ms agreement with kernel baselines.
  • Browser Frame-Budget Profiling: Profiled sustained 2,500 msg/s WebSocket bursts in Chrome DevTools, verifying frame commit times stayed at ~2.1ms (60fps) with zero forced synchronous layouts.

Results

  • Fast, Actionable Bufferbloat Isolation: Completes idle + loaded uplink/downlink profiling in under 8 seconds from a 6.2 MB standalone Go binary.
  • Sustained Telemetry Observability: Enables continuous ISP and VPN link SLA tracking via native Prometheus scraping without third-party agents.

Evidence

Diagnostic origin & root-cause field notes
LC // ORIGIN
Cross-posting & syndication
Canonical URL: https://tedcraft.dev/works/speed-my-net/
Syndicate or reference this case-study with canonical attribution