cfspeedtest 2.2.2

Unofficial CLI for speed.cloudflare.com
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use cfspeedtest::speedtest::test_download;
use cfspeedtest::OutputFormat;

fn main() {
    println!("Testing download speed with 10MB of payload");

    let download_speed = test_download(
        &reqwest::blocking::Client::new(),
        10_000_000,
        OutputFormat::None, // don't write to stdout while running the test
    );

    println!("download speed in mbit: {download_speed}")
}