#speed #bandwidth #testing-tools #networking #testing #cli-tool

app speedtest

Rust-based network speed testing tool between two computers

5 releases

0.2.0 Jan 31, 2024
0.1.3 Jan 31, 2024
0.1.2 Jan 31, 2024
0.1.1 Jan 31, 2024
0.1.0 Jan 31, 2024

#289 in Network programming

Download history 23/week @ 2024-01-29 8/week @ 2024-02-26 2/week @ 2024-03-04 1/week @ 2024-03-11 231/week @ 2024-03-25 4/week @ 2024-04-01

235 downloads per month

MIT license

8KB
102 lines

Speedtest ๐Ÿš€

Speedtest is a Rust-based ๐Ÿฆ€ command-line utility designed for measuring network speed between two computers. It provides two subcommands: serve and test, allowing users to set up a server on one machine and perform network speed tests from another machine.

Installation ๐Ÿ“ฉ

To install Speedtest, use the following command:

cargo install speedtest

Usage ๐ŸŽฏ

Rust-based network speed testing tool between two computers

Usage: speedtest <COMMAND>

Commands:
  serve  Listen to incoming TCP connections on the given socket address
  test   Connect to a TCP server with the given socket address
  help   Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Serve

Listen to incoming TCP connections on the given socket address

Usage: speedtest serve <SOCKET>

Arguments:
  <SOCKET>  Socket address

Options:
  -h, --help  Print help

Test

Connect to a TCP server with the given socket address

Usage: speedtest.exe test [OPTIONS] <SOCKET>

Arguments:
  <SOCKET>  Socket address

Options:
  -l, --length <LENGTH>  How much bytes to send to the server [default: 10MB]
  -h, --help             Print help

Examples ๐Ÿ“„

  1. Set up a server on one computer:
speedtest serve 127.0.0.1:8080
  1. Run a speed test from another computer (by sending 100 MB (Megabytes)):
speedtest test 127.0.0.1:8080 --length 100

Output ๐Ÿงป

Server

~> speedtest serve 0.0.0.0:1234
2024-01-31T01:00:58.464460Z  INFO server{socket_addr=0.0.0.0:1234}: speedtest: Listening...
2024-01-31T01:01:12.014269Z  INFO speedtest: Incoming connection

Client

~> speedtest test 127.0.0.1:1234 -l 100MB
2024-01-31T01:01:12.014113Z  INFO client{socket_addr=127.0.0.1:1234 length=100}: speedtest: Stream accepted
2024-01-31T01:01:12.014229Z  INFO client{socket_addr=127.0.0.1:1234 length=100}: speedtest: Writing data...
Transferred data: 100 MB
Elapsed time: 123.7696ms
Transfer speed: 807.95 MB/s

Dependencies

~4โ€“14MB
~136K SLoC