Crates.io | spt |
lib.rs | spt |
version | 1.0.0 |
source | src |
created_at | 2023-10-21 13:30:49.268449 |
updated_at | 2023-10-21 13:30:49.268449 |
description | A simple Speed Test CLI |
homepage | https://github.com/Colerar/spt/ |
repository | |
max_upload_size | |
id | 1010036 |
size | 48,405 |
A simple Speed Test CLI.
cargo build --release
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 │
╰──────────────────────────────────────────────────────────────────┴─────────────╯