spt

Crates.iospt
lib.rsspt
version1.0.0
sourcesrc
created_at2023-10-21 13:30:49.268449
updated_at2023-10-21 13:30:49.268449
descriptionA simple Speed Test CLI
homepagehttps://github.com/Colerar/spt/
repository
max_upload_size
id1010036
size48,405
(Colerar)

documentation

README

SPT

A simple Speed Test CLI.

Build

cargo build --release

Usage

Pass URLs

❯ spt https://upos-sz-mirrorali.bilivideo.com/_probe_/size_kbyte/10240 
==> GET https://upos-sz-mirrorali.bilivideo.com/_probe_/size_kbyte/10240
HTTP/1.1 200 OK 117.01561ms
  [00:00:00] [####################] 100% (18.88 MiB/s, 0s)

╭──────────────────────────────────────────────────────────────────┬─────────────╮
│ URL                                                              │ Speed       │
╞══════════════════════════════════════════════════════════════════╪═════════════╡
│ https://upos-sz-mirrorali.bilivideo.com/_probe_/size_kbyte/10240 │ 18.90 MiB/s │
╰──────────────────────────────────────────────────────────────────┴─────────────╯

Or read URLs from file:

# in.txt
# Comments are allowed (line starts with // or #)
https://upos-sz-mirrorali.bilivideo.com/_probe_/size_kbyte/10240
GET https://upos-sz-mirrorcos.bilivideo.com/_probe_/size_kbyte/10240
❯ spt -f ./in.txt 
==> GET https://upos-sz-mirrorali.bilivideo.com/_probe_/size_kbyte/10240
HTTP/1.1 200 OK 51.049333ms
  [00:00:00] [####################] 100% (19.52 MiB/s, 0s)

==> GET https://upos-sz-mirrorcos.bilivideo.com/_probe_/size_kbyte/10240
HTTP/2.0 200 OK 342.579522ms
  [00:00:09] [####################] 100% (1.07 MiB/s, 0s)

╭──────────────────────────────────────────────────────────────────┬─────────────╮
│ URL                                                              │ Speed       │
╞══════════════════════════════════════════════════════════════════╪═════════════╡
│ https://upos-sz-mirrorali.bilivideo.com/_probe_/size_kbyte/10240 │ 19.53 MiB/s │
├──────────────────────────────────────────────────────────────────┼─────────────┤
│ https://upos-sz-mirrorcos.bilivideo.com/_probe_/size_kbyte/10240 │ 1.07 MiB/s  │
╰──────────────────────────────────────────────────────────────────┴─────────────╯
Commit count: 0

cargo fmt