Skip to content

Replace the asciinema examples with terminal GIFs in the README - #316

Merged
code-inflation merged 7 commits into
masterfrom
docs/readme-previews
Nov 29, 2026
Merged

code-inflation merged 7 commits into
masterfrom
docs/readme-previews

Conversation

@code-inflation

@code-inflation code-inflation commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

The two examples in the README are asciinema recordings that no longer match the current interactive output. They show an older terminal layout without the live progress bar or the results table that fills in as each payload finishes.

This replaces them with two terminal GIFs recorded from the current build. The first shows the metadata, latency summary, and live results for a 25 MB sweep. The second shows the start of the JSON document printed by --output-format json-pretty for a 1 MB sweep. The command-line help and options are unchanged.

The recorder's local fixture now paces transfers to 250 Mbit/s down and 100 Mbit/s up instead of sending at loopback speed. It schedules each download chunk before writing it and delays each upload response to simulate the transfer time. The recorder defaults to a 10 MB sweep and warns if the estimated run time exceeds the CLI's deadline. Use --down-mbit and --up-mbit to change the rates or --max-duration to allow a longer run.

Both recordings use the local fixture and don't contact Cloudflare. They use placeholder metadata, including an IP address from a documentation range. The throughput figures are for illustration, not a benchmark.

Terminal previews

Terminal recording showing all eight transfer rows with the progress bar.

Start of the JSON document printed by cfspeedtest --output-format json-pretty.

The fixture pushed each payload as fast as loopback allowed, so the
recorded table climbed from about 6 Mbit/s at 100 KB to about 3.7 Gbit/s
at 100 MB. That shape came from a fixed per-request sleep and a re-ramp on
every sample, not from the payload size.

Downloads now write paced chunks and wait for the peer to drain its socket
queue. Uploads hold the response for the transfer time, because the
client stops its timer on the response and the kernel buffers megabytes
ahead of its writes either way. Both ends disable Nagle, which removes a
45 ms delayed-ACK stall on the small payloads, and the fixture keeps the
connection alive between requests.

The default sweep is 10 MB, since the paced 100 MB sweep takes about
150 seconds and exceeds the CLI's run deadline. The recorder warns when a
sweep would not finish, and --down-mbit and --up-mbit change the rates.
@code-inflation
code-inflation marked this pull request as ready for review November 29, 2026 11:04
@code-inflation
code-inflation merged commit 68d7dac into master Nov 29, 2026
6 checks passed
@code-inflation
code-inflation deleted the docs/readme-previews branch November 29, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant