We build web tools, but we must be honest: A browser is a terrible place to measure raw UDP/TCP performance.
1. The Single-Thread Bottleneck
JavaScript is single-threaded. On a Gigabit connection, the CPU often becomes the bottleneck before the network does.
2. HTTP Overhead
Browser tests use XHR or Fetch APIs (HTTP/HTTPS). This adds encryption (TLS) overhead and HTTP framing. Native tools like iperf3 use raw TCP sockets.
Conclusion: Use the web test for a quick check. Use the CLI for engineering validation.