Show HN: Cfbench – A lightweight native CLI for Cloudflare speed tests

fcen1 pts0 comments

GitHub - fcendesu/cfbench · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

fcendesu

cfbench

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>49 Commits<br>49 Commits

.github

.github

docs

docs

scripts

scripts

src

src

tests

tests

.gitignore

.gitignore

AGENTS.md

AGENTS.md

CHANGELOG.md

CHANGELOG.md

CLAUDE.md

CLAUDE.md

Cargo.lock

Cargo.lock

Cargo.toml

Cargo.toml

LICENSE

LICENSE

README.md

README.md

View all files

Repository files navigation

cfbench

cfbench is a lightweight, native Rust command-line speed test for Cloudflare's edge network. It measures download and upload bandwidth, idle latency and jitter, and latency while the connection is loaded. It has no TUI, browser runtime, telemetry service, or local database.

cfbench is unofficial and is not affiliated with, endorsed by, or supported by Cloudflare.

Install (Linux x86_64)

For Debian/Ubuntu it installs the verified .deb; for Fedora/RHEL-family systems it installs the verified .rpm. It asks for your password only when the package manager needs sudo. Other supported Linux distributions receive the verified standalone binary in ~/.local/bin.

curl -fsSL https://raw.githubusercontent.com/fcendesu/cfbench/main/scripts/install.sh | sh

To pin a release:

curl -fsSL https://raw.githubusercontent.com/fcendesu/cfbench/main/scripts/install.sh | CFBENCH_VERSION=0.1.1 sh

Manual package downloads are also available from GitHub Releases.

Build from source

Rust 1.95 or newer is required:

git clone https://github.com/fcendesu/cfbench.git<br>cd cfbench<br>cargo install --path .

Usage

result.json<br>cfbench --quiet --timeout 60">cfbench<br>cfbench --ipv4<br>cfbench --ipv6 --no-upload<br>cfbench --no-loaded-latency<br>cfbench --no-metadata<br>cfbench --json > result.json<br>cfbench --quiet --timeout 60

Run cfbench --help for the complete option list. Progress and diagnostics use stderr. --json writes exactly one schema-v1 JSON document to stdout and suppresses progress; --quiet also suppresses progress.

Example output

The values below are illustrative and will vary by connection. --no-metadata keeps public IP, network, and edge-location information out of the result.

$ cfbench --no-metadata<br>Testing against Cloudflare edge...<br>[latency 1/1] 18.42 ms<br>[download 100 KB 1/1] 71.25 Mbps — 11.2 ms<br>...

cfbench 0.1.1<br>Target: Cloudflare edge<br>Protocol: IPv6 / HTTP/1.1<br>Metadata: disabled<br>Measured at: 2026-07-26T12:00:00.000Z

Idle latency: 17.86 ms<br>Idle jitter: 1.44 ms<br>Download: 742.18 Mbps<br>Download latency: 29.73 ms<br>Download jitter: 4.10 ms<br>Upload: 216.94 Mbps<br>Upload latency: 47.81 ms<br>Upload jitter: 7.62 ms

Downloaded: 469.0 MB<br>Uploaded: 296.8 MB<br>Duration: 24.18 s

What it measures

Idle latency and jitter

Download and upload bandwidth

Download-loaded and upload-loaded latency and jitter

Transferred payload bytes, duration, negotiated HTTP version, and raw measurement points

Optional Cloudflare /meta context: public IP, ASN, network organization, and edge/location data

--no-metadata skips the /meta request completely. The tool does not collect or send results to a cfbench service.

Packet loss is deliberately not displayed or measured in the 0.1 release series. Cloudflare's metric requires TURN/WebRTC; cfbench does not substitute ICMP loss or present an incompatible value as packet loss.

Compatibility

cfbench follows Cloudflare Speedtest v1.12.1 for its request order, payload sizes, thresholds, percentile reductions, and loaded-latency rules. Native Rust timing cannot exactly reproduce the browser's PerformanceResourceTiming boundaries or browser-only TCP connection calibration, so results are methodology-compatible rather than numerically identical.

See installation details and measurement compatibility.

License

Licensed under the MIT License.

About<br>No description, website, or topics provided.<br>Resources<br>Readme<br>MIT license<br>Activity<br>Stars<br>0 stars<br>Watchers<br>0 watching<br>Forks<br>0 forks<br>Report repository

Releases

Packages

Contributors

Languages

You can’t...

cfbench latency cloudflare download upload github

Related Articles