speedtest-cli is the client tool (written in C) to measure upload and download throughput of a router against nearest speedtest.net public server.
Usage: speedtest-cli [OPTIONS]
OPTIONS:
-s Disable real time reporting of Download/Upload speed. Print only the final result.
-d Compute download speed only.
-u Compute upload speed only.
-h Print this help.