From 58501b50d17dc9e6b8e4a118ac0f8e7b4a3de9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 10:30:41 +0000 Subject: [PATCH 1/7] Replace the asciinema examples with terminal GIFs in the README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aba3a1d..7cc272b 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ Options: ``` Example usage: -[![asciicast](https://asciinema.org/a/Moun5mFB1sm1VFkkFljG9UGyz.svg)](https://asciinema.org/a/Moun5mFB1sm1VFkkFljG9UGyz) +![Terminal recording of cfspeedtest with no arguments, showing the progress bar and the results table.](README_DEFAULT_GIF) Example with json-pretty output: -[![asciicast](https://asciinema.org/a/P6IUAADtaCq3bT18GbYVHmksA.svg)](https://asciinema.org/a/P6IUAADtaCq3bT18GbYVHmksA) +![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](README_JSON_GIF) In human-readable mode, live progress is shown on stderr only when it is a terminal. When both stdout and stderr are terminals, each completed transfer size adds a row to the results table. Redirecting stdout keeps the end-of-run summary instead, without progress redraws. CSV and JSON modes never draw a progress bar. From 3f79f088066d2778486a3eb26af0910038ffaa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 10:31:03 +0000 Subject: [PATCH 2/7] Point the README examples at the recorded terminal GIFs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7cc272b..3ab9419 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ Options: ``` Example usage: -![Terminal recording of cfspeedtest with no arguments, showing the progress bar and the results table.](README_DEFAULT_GIF) +![Terminal recording of cfspeedtest with no arguments, showing the progress bar and the results table.](https://github.com/user-attachments/assets/bbeba1f2-c872-403a-ab9d-2e4b35dd171e) Example with json-pretty output: -![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](README_JSON_GIF) +![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](https://github.com/user-attachments/assets/667ff00e-ded4-407c-9746-32d812baf626) In human-readable mode, live progress is shown on stderr only when it is a terminal. When both stdout and stderr are terminals, each completed transfer size adds a row to the results table. Redirecting stdout keeps the end-of-run summary instead, without progress redraws. CSV and JSON modes never draw a progress bar. From b967064f3a572677cd587d95af8f920e21e9956c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 11:00:41 +0000 Subject: [PATCH 3/7] Pace the preview fixture to realistic link speeds 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. --- .agents/skills/interactive-cli-pr/SKILL.md | 4 +- .../record_preview.cpython-312.pyc | Bin 0 -> 20987 bytes .../scripts/record_preview.py | 104 ++++++++++++++++-- 3 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 .agents/skills/interactive-cli-pr/scripts/__pycache__/record_preview.cpython-312.pyc diff --git a/.agents/skills/interactive-cli-pr/SKILL.md b/.agents/skills/interactive-cli-pr/SKILL.md index 6ef62b1..008ac4a 100644 --- a/.agents/skills/interactive-cli-pr/SKILL.md +++ b/.agents/skills/interactive-cli-pr/SKILL.md @@ -33,7 +33,9 @@ If the checkout being reviewed does not contain this skill yet, use the recorder - The recorder runs the real binary with stdout and stderr attached to the same pseudo-terminal. Both streams need to be terminals to see the interactive results table. A pipe or `Command::output()` alone captures a different layout. - A local test server supplies synthetic metadata and payloads. This keeps runs reproducible, avoids public service traffic, and keeps real network details out of the recording. The numbers are for layout review, not a benchmark. -- The default demo runs both directions through 100 KB, 1 MB, 10 MB, 25 MB, and 100 MB with the binary's default latency and transfer counts. The recorder sets the max to 100 MB and disables adaptive stopping so all sizes appear. Use a shorter sweep only when it better shows the change, for example `--max-payload-size 100k` for one payload per direction. +- The fixture paces transfers to 250 Mbit/s down and 100 Mbit/s up by default, so throughput stops growing with the payload size and the table shows realistic values. Downloads are paced by holding back writes until the client's socket queue drains. Uploads cannot be paced from the read side, because the kernel buffers megabytes ahead of the client's writes, so the response is held for the transfer time instead. Change the rates with `--down-mbit` and `--up-mbit` if a change is easier to see at a different speed. +- The default demo runs both directions through 100 KB, 1 MB, and 10 MB with the binary's default latency and transfer counts. The recorder sets the max to 10 MB and disables adaptive stopping so all sizes appear. Pacing makes large payloads slow: 10 MB takes about 20 seconds, 25 MB about 50, and 100 MB around 150, which exceeds the CLI's 120-second deadline. Raise `--max-payload-size` only when the change needs a larger row, and the recorder warns when the sweep will not finish. Use a shorter sweep when it better shows the change, for example `--max-payload-size 100k` for one payload per direction. +- The 100 KB row varies by more than the larger rows. A 100 KB transfer spends most of its time on connection setup, so the client's per-request cost is a large share of that row. Do not read it as a fixture problem, and do not try to steady it by slowing the small payloads down. - Use the clean scenario for general layout changes. Add `--scenario retry` to inject a single HTTP 429 with a two-second wait, or `--scenario partial` for an HTTP 403 after two valid samples. Explain any injected error in the caption so it does not look like a failed demo. PR #313 used the full sweep with the recovered 429 to show the retry line and final diagnostic. - The recorder applies the real cursor movements with `pyte`, then draws distinct screen states with Pillow and holds on the final frame. It captures text and layout, not terminal colors or font attributes. Use a native terminal recording if the change is about color or styling, or if it needs interactive input. Use `--columns` and `--rows` for a specific viewport and `--start-at 'visible text'` to open on a specific state. - Open the GIF and, if generated, the final PNG before attaching. Check that viewers can see the change while it is happening, that the final output is legible, and that the recording contains no real IP addresses, secrets, or local paths. If you change defaults or how requests are made, update the fixture or its verification rather than uploading a misleading demo. diff --git a/.agents/skills/interactive-cli-pr/scripts/__pycache__/record_preview.cpython-312.pyc b/.agents/skills/interactive-cli-pr/scripts/__pycache__/record_preview.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6c029ae602d954b731e50294228423620dff9ce GIT binary patch literal 20987 zcmbt+3s79wndZIye$znnlmwTT1d@2^{eA)x5&{X3AJ_?QaU0aA>BhG&LUbAjdpzqV zBd?(1jL=wFql{;b*P4w|@l*ZsmH{g<{mS9T6!$( zY3;G%srJ~0vU;+3YE$E}4`ugc59Rdauy?H|cgWG>U}2pnZz#VfpM~|Ff}z5m!l9y` zBKEHG6!#RPyuq_>XnoK6p$$D7hDv%$kY*H3qFJEfu8(n%aUsS!Lj?YQYCb8gUuBTcogkPiLPH!-(YZ4}08ljXI`n9dZu1 zVn+68lANQ7V2jTyyJ!C$&$*8r%i`Pj8Cm2uw9{rs2O8f{F|*wAn(rfM9DsT&*M zZQD7-;)a%s(EDYA+W{H}cf@xj9^jrnvU~**4*{=S0|v=+F+=z9v%RhDEggLnsW<{{ zTFQrEc-J{uiRUKxG2X}pxxvIjCle5mHOkwdvNeJsJ^7a z5~C&As-zCulu+s^YJ$9|71hPuJIGH?f^SOmOEPEzyS)7%(8%3V=E&5iOk zy1);QjR6`2`JzhzWJtnAEWOtUi0HfI^^JO5;($vO#$0lp$t1wFxxFJ-1lN^epP!X- z`vuW0x%y>ZX|m))+>y5X^y1v_ZOCH7vRRggBK@;dzdgYYJ}M;6Xt59?h-%e%e&)|cbCXp^i?|;Y8IM+}e^AN8 z?@IzPQi0v#+n|zRcsaR6g6br&@^W%3q&9$(O8D_o6M%V#tVdnU4JJWTi2>lMloCAm zJG8=I-GMEkrdES0QA5uFHdtEQ>@-WYOCbe|2Dt!I={K$kYD6vTcYa#g4E+vjQvDv& zjp=IiftDwoZdm}X1h&k;vND5Y*(m`s1<5J9wgOX&f(LKOop{OR8pfum zTc&jw_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H_TJx;mWpf z-kAkMd(>>1($EdG1#`u$`U7*tT;m&>XPw?f@ z@-1`6XG_BkrFeUOZj=OEU>bA?eDS>c0N;^waa^(ut-e zqkYP8eZ%yIS?bc`AgZwi`iw7?6SH1#hQbWnuGVmh3wNIU1C62 zZ7ZrAV{z0`HQT?qaZhC9o^aLPaL&Ha@sI5=g>)?1t0MNQsC`G&UL3XOu9$UX3b_LL z?B2VM#l7v3z3t&W9XQj^@+VYyoK&5r#|c#%J=#=f>5+d<1v|-g!ddgP-}Uu#taKyRBoh`lrINx(==C z?`#5I{$5+&u}S;)o75EEtnJvYr*Ejx{_gFq*(M3t-x5A($4PGzO86u4X2|v)R)k_^5RGIU4BFWr|C)@M4yU>}hLeZ@k%+R18F7DBl6^jp zpNX64{;hn`1DhE=rCM;g6)$yh#AcvUq-m3;DN%j4wT-Dgn8t&do5YWSdz9s`$g7|Z z(Wj`SYVx*FF+JqfxG5{KZ+^u;h(z=i`?3qW6%|LlglFT(oUkiHeeru(rzl|uc{IT> z!-4omXAVh+kPrWy|9`=Q`4i8>6qax2|B1``h_kSN<42t7BhIS)XR}w^N1Xj5&ipg3 z^dGt7KjTV%#ufe}x8lPE*56u9!nSHbJym{+{;epP^*F7lL@x_mF^n6*^RtDiK zU-rmxhUW{zw#r8w1s*)7YT%0=^z%8q>A_|@uY0g@KfEB{!t+%tohnXa2?g$}i$2sC Oe!m3>P80tE#{UCn1Fc^G literal 0 HcmV?d00001 diff --git a/.agents/skills/interactive-cli-pr/scripts/record_preview.py b/.agents/skills/interactive-cli-pr/scripts/record_preview.py index 16fefd5..e106ec3 100644 --- a/.agents/skills/interactive-cli-pr/scripts/record_preview.py +++ b/.agents/skills/interactive-cli-pr/scripts/record_preview.py @@ -10,8 +10,10 @@ import os import pty import select +import socket import struct import subprocess +import sys import termios import threading import time @@ -33,21 +35,62 @@ } DEFAULT_LATENCY = 25 DEFAULT_SAMPLES = 10 -BLOCK = b"0" * (1024 * 1024) +DOWN_MBIT = 250.0 +UP_MBIT = 100.0 +# Keep the fixture inside the CLI's default 120-second run deadline. +DEADLINE_SECONDS = 120 +BLOCK = b"0" * (64 * 1024) +TCP_INFO = getattr(socket, "TCP_INFO", None) + + +def queued_bytes(sock): + """Bytes the peer has not acknowledged yet. + + Linux exposes this directly. Other platforms return 0, so pacing still + works, but only up to the socket buffers instead of the peer's reads. + """ + if TCP_INFO is None: + return 0 + try: + raw = sock.getsockopt(socket.IPPROTO_TCP, TCP_INFO, 32) + except OSError: + return 0 + if len(raw) < 20: + return 0 + return struct.unpack(" 4 * len(BLOCK): + time.sleep(0.002) + ahead = sent * 8 / (mbit * 1e6) - (time.monotonic() - start) + if ahead > 0: + time.sleep(ahead) class Fixture(ThreadingHTTPServer): - def __init__(self, scenario): + def __init__(self, scenario, down_mbit, up_mbit): super().__init__(("127.0.0.1", 0), Handler) self.scenario = scenario + self.down_mbit = down_mbit + self.up_mbit = up_mbit self.downloads = Counter() self.uploads = Counter() class Handler(BaseHTTPRequestHandler): + protocol_version = "HTTP/1.1" + def log_message(self, *_args): pass + def setup(self): + super().setup() + # Without this, every response waits on Nagle plus delayed ACK and the + # small payloads measure about 45 ms of stall instead of the link rate. + self.connection.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + def respond(self, size, *, status=200, headers=()): self.send_response(status) self.send_header("Content-Length", str(size)) @@ -61,6 +104,7 @@ def do_GET(self): body = b"ip=127.0.0.1\ncolo=XXX\nloc=XX\n" self.respond(len(body)) self.wfile.write(body) + self.wfile.flush() return url = urlsplit(self.path) if url.path != "/__down": @@ -73,7 +117,6 @@ def do_GET(self): time.sleep(0.062) self.respond(0, headers=[("Server-Timing", 'cfL4;desc="?rtt=18000"')]) return - time.sleep(0.108 + 0.008 * (attempt % 4)) if size == SIZES["100k"] and attempt == 3: if self.server.scenario == "retry": self.respond(0, status=429, headers=[("Retry-After", "2")]) @@ -82,11 +125,20 @@ def do_GET(self): self.respond(0, status=403) return self.respond(size) - whole, rest = divmod(size, len(BLOCK)) - for _ in range(whole): - self.wfile.write(BLOCK) - if rest: - self.wfile.write(BLOCK[:rest]) + self.wfile.flush() + # Pace the body so throughput reflects the configured rate and payload + # size stops mattering, which is what a real link does. + start = time.monotonic() + sent = 0 + while sent < size: + chunk = min(len(BLOCK), size - sent) + try: + self.wfile.write(BLOCK[:chunk]) + self.wfile.flush() + except OSError: + return + sent += chunk + pace(start, sent, self.server.down_mbit, self.connection) def do_POST(self): if self.path != "/__up": @@ -100,7 +152,10 @@ def do_POST(self): if not chunk: return remaining -= len(chunk) - time.sleep(0.110 + 0.008 * (self.server.uploads[size] % 4)) + # The client stops its upload timer when the response arrives, so the + # delay has to sit here. Reading slowly would not work: the kernel + # buffers megabytes ahead of the client's writes either way. + time.sleep(size * 8 / (self.server.up_mbit * 1e6)) self.respond(0) @@ -267,9 +322,18 @@ def main(): parser.add_argument( "--scenario", choices=("clean", "retry", "partial"), default="clean" ) - parser.add_argument("--max-payload-size", choices=tuple(SIZES), default="100m") + parser.add_argument("--max-payload-size", choices=tuple(SIZES), default="10m") parser.add_argument("--columns", type=int, default=100) parser.add_argument("--rows", type=int, default=27) + parser.add_argument( + "--down-mbit", + type=float, + default=DOWN_MBIT, + help="Simulated download rate in Mbit/s", + ) + parser.add_argument( + "--up-mbit", type=float, default=UP_MBIT, help="Simulated upload rate in Mbit/s" + ) parser.add_argument("--font", type=Path) parser.add_argument( "--start-at", help="Start at the first stable frame containing this text" @@ -279,9 +343,27 @@ def main(): parser.error(f"{args.binary} not found. Build the PR checkout first.") if not 1 <= args.columns <= 240 or not 1 <= args.rows <= 80: parser.error("Use a viewport between 1x1 and 240x80") + if args.down_mbit <= 0 or args.up_mbit <= 0: + parser.error("Use positive --down-mbit and --up-mbit rates") + # Each sample also pays request setup on top of the transfer time, which + # matters for the small payloads where the paced transfer is quick. + setup = 0.02 * 2 * DEFAULT_SAMPLES + estimated = setup + sum( + DEFAULT_SAMPLES * size * 8 / 1e6 * (1 / args.down_mbit + 1 / args.up_mbit) + for size in SIZES.values() + if size <= SIZES[args.max_payload_size] + ) + if estimated > DEADLINE_SECONDS: + print( + f"warning: {args.max_payload_size} at {args.down_mbit:g}/{args.up_mbit:g} " + f"Mbit/s needs about {estimated:.0f} s and will hit the CLI's " + f"{DEADLINE_SECONDS} s deadline. Lower --max-payload-size or raise " + f"--max-duration.", + file=sys.stderr, + ) font = load_font(args.font) - with Fixture(args.scenario) as server: + with Fixture(args.scenario, args.down_mbit, args.up_mbit) as server: thread = threading.Thread(target=server.serve_forever, daemon=True) thread.start() try: From 2fe3ac6b4d9684f2406ca140cee4b9706bc21600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 11:02:11 +0000 Subject: [PATCH 4/7] Keep Python bytecode out of the skill directory --- .agents/skills/interactive-cli-pr/.gitignore | 1 + .../__pycache__/record_preview.cpython-312.pyc | Bin 20987 -> 0 bytes 2 files changed, 1 insertion(+) create mode 100644 .agents/skills/interactive-cli-pr/.gitignore delete mode 100644 .agents/skills/interactive-cli-pr/scripts/__pycache__/record_preview.cpython-312.pyc diff --git a/.agents/skills/interactive-cli-pr/.gitignore b/.agents/skills/interactive-cli-pr/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.agents/skills/interactive-cli-pr/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/.agents/skills/interactive-cli-pr/scripts/__pycache__/record_preview.cpython-312.pyc b/.agents/skills/interactive-cli-pr/scripts/__pycache__/record_preview.cpython-312.pyc deleted file mode 100644 index f6c029ae602d954b731e50294228423620dff9ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20987 zcmbt+3s79wndZIye$znnlmwTT1d@2^{eA)x5&{X3AJ_?QaU0aA>BhG&LUbAjdpzqV zBd?(1jL=wFql{;b*P4w|@l*ZsmH{g<{mS9T6!$( zY3;G%srJ~0vU;+3YE$E}4`ugc59Rdauy?H|cgWG>U}2pnZz#Vf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u4X2|v)R)k_^5RGIU4BFWr|C)@M4yU>}hLeZ@k%+R18F7DBl6^jp zpNX64{;hn`1DhE=rCM;g6)$yh#AcvUq-m3;DN%j4wT-Dgn8t&do5YWSdz9s`$g7|Z z(Wj`SYVx*FF+JqfxG5{KZ+^u;h(z=i`?3qW6%|LlglFT(oUkiHeeru(rzl|uc{IT> z!-4omXAVh+kPrWy|9`=Q`4i8>6qax2|B1``h_kSN<42t7BhIS)XR}w^N1Xj5&ipg3 z^dGt7KjTV%#ufe}x8lPE*56u9!nSHbJym{+{;epP^*F7lL@x_mF^n6*^RtDiK zU-rmxhUW{zw#r8w1s*)7YT%0=^z%8q>A_|@uY0g@KfEB{!t+%tohnXa2?g$}i$2sC Oe!m3>P80tE#{UCn1Fc^G From 14192909ed9dc1af7b7d4e26a72debd99e01964d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 11:02:32 +0000 Subject: [PATCH 5/7] Point the README examples at the re-recorded GIFs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3ab9419..25b7657 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ Options: ``` Example usage: -![Terminal recording of cfspeedtest with no arguments, showing the progress bar and the results table.](https://github.com/user-attachments/assets/bbeba1f2-c872-403a-ab9d-2e4b35dd171e) +![Terminal recording showing all eight transfer rows with the progress bar.](https://github.com/user-attachments/assets/03f87e7d-d8af-4bc9-a1de-ee09840d684d) Example with json-pretty output: -![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](https://github.com/user-attachments/assets/667ff00e-ded4-407c-9746-32d812baf626) +![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](https://github.com/user-attachments/assets/563166f2-79a7-4bbc-aa36-aefa3e953cf3) In human-readable mode, live progress is shown on stderr only when it is a terminal. When both stdout and stderr are terminals, each completed transfer size adds a row to the results table. Redirecting stdout keeps the end-of-run summary instead, without progress redraws. CSV and JSON modes never draw a progress bar. From 107e19f4c756130b17b474a585e41cf5a774777e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 11:19:12 +0000 Subject: [PATCH 6/7] Honor preview deadlines and pace download writes --- .agents/skills/interactive-cli-pr/SKILL.md | 4 +- .../scripts/record_preview.py | 79 +++++++++---------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/.agents/skills/interactive-cli-pr/SKILL.md b/.agents/skills/interactive-cli-pr/SKILL.md index 008ac4a..89d6494 100644 --- a/.agents/skills/interactive-cli-pr/SKILL.md +++ b/.agents/skills/interactive-cli-pr/SKILL.md @@ -33,8 +33,8 @@ If the checkout being reviewed does not contain this skill yet, use the recorder - The recorder runs the real binary with stdout and stderr attached to the same pseudo-terminal. Both streams need to be terminals to see the interactive results table. A pipe or `Command::output()` alone captures a different layout. - A local test server supplies synthetic metadata and payloads. This keeps runs reproducible, avoids public service traffic, and keeps real network details out of the recording. The numbers are for layout review, not a benchmark. -- The fixture paces transfers to 250 Mbit/s down and 100 Mbit/s up by default, so throughput stops growing with the payload size and the table shows realistic values. Downloads are paced by holding back writes until the client's socket queue drains. Uploads cannot be paced from the read side, because the kernel buffers megabytes ahead of the client's writes, so the response is held for the transfer time instead. Change the rates with `--down-mbit` and `--up-mbit` if a change is easier to see at a different speed. -- The default demo runs both directions through 100 KB, 1 MB, and 10 MB with the binary's default latency and transfer counts. The recorder sets the max to 10 MB and disables adaptive stopping so all sizes appear. Pacing makes large payloads slow: 10 MB takes about 20 seconds, 25 MB about 50, and 100 MB around 150, which exceeds the CLI's 120-second deadline. Raise `--max-payload-size` only when the change needs a larger row, and the recorder warns when the sweep will not finish. Use a shorter sweep when it better shows the change, for example `--max-payload-size 100k` for one payload per direction. +- The fixture paces transfers to 250 Mbit/s down and 100 Mbit/s up by default, so larger samples approach the configured rates. Each download chunk is scheduled by elapsed time. Uploads cannot be paced from the read side, because the kernel buffers megabytes ahead of the client's writes, so the response is held for the transfer time instead. Change the rates with `--down-mbit` and `--up-mbit` if a change is easier to see at a different speed. +- The default demo runs both directions through 100 KB, 1 MB, and 10 MB with the binary's default latency and transfer counts. The recorder sets the max to 10 MB and disables adaptive stopping so all sizes appear. Pacing makes large payloads slow: 10 MB takes about 20 seconds, 25 MB about 50, and 100 MB around 150, which exceeds the CLI's 120-second deadline. The recorder warns if the estimated sweep exceeds the deadline. Use `--max-duration` to give longer runs more time. Use a shorter sweep when it better shows the change, for example `--max-payload-size 100k` for one payload per direction. - The 100 KB row varies by more than the larger rows. A 100 KB transfer spends most of its time on connection setup, so the client's per-request cost is a large share of that row. Do not read it as a fixture problem, and do not try to steady it by slowing the small payloads down. - Use the clean scenario for general layout changes. Add `--scenario retry` to inject a single HTTP 429 with a two-second wait, or `--scenario partial` for an HTTP 403 after two valid samples. Explain any injected error in the caption so it does not look like a failed demo. PR #313 used the full sweep with the recovered 429 to show the retry line and final diagnostic. - The recorder applies the real cursor movements with `pyte`, then draws distinct screen states with Pillow and holds on the final frame. It captures text and layout, not terminal colors or font attributes. Use a native terminal recording if the change is about color or styling, or if it needs interactive input. Use `--columns` and `--rows` for a specific viewport and `--start-at 'visible text'` to open on a specific state. diff --git a/.agents/skills/interactive-cli-pr/scripts/record_preview.py b/.agents/skills/interactive-cli-pr/scripts/record_preview.py index e106ec3..d7f6d89 100644 --- a/.agents/skills/interactive-cli-pr/scripts/record_preview.py +++ b/.agents/skills/interactive-cli-pr/scripts/record_preview.py @@ -38,35 +38,9 @@ DOWN_MBIT = 250.0 UP_MBIT = 100.0 # Keep the fixture inside the CLI's default 120-second run deadline. -DEADLINE_SECONDS = 120 +DEFAULT_MAX_DURATION = 120 +CAPTURE_GRACE_SECONDS = 5 BLOCK = b"0" * (64 * 1024) -TCP_INFO = getattr(socket, "TCP_INFO", None) - - -def queued_bytes(sock): - """Bytes the peer has not acknowledged yet. - - Linux exposes this directly. Other platforms return 0, so pacing still - works, but only up to the socket buffers instead of the peer's reads. - """ - if TCP_INFO is None: - return 0 - try: - raw = sock.getsockopt(socket.IPPROTO_TCP, TCP_INFO, 32) - except OSError: - return 0 - if len(raw) < 20: - return 0 - return struct.unpack(" 4 * len(BLOCK): - time.sleep(0.002) - ahead = sent * 8 / (mbit * 1e6) - (time.monotonic() - start) - if ahead > 0: - time.sleep(ahead) class Fixture(ThreadingHTTPServer): @@ -126,19 +100,23 @@ def do_GET(self): return self.respond(size) self.wfile.flush() - # Pace the body so throughput reflects the configured rate and payload - # size stops mattering, which is what a real link does. + # Schedule each write before sending it, including the final chunk: + # the client stops timing as soon as it has the whole body. start = time.monotonic() sent = 0 while sent < size: chunk = min(len(BLOCK), size - sent) + ahead = (sent + chunk) * 8 / (self.server.down_mbit * 1e6) - ( + time.monotonic() - start + ) + if ahead > 0: + time.sleep(ahead) try: self.wfile.write(BLOCK[:chunk]) self.wfile.flush() except OSError: return sent += chunk - pace(start, sent, self.server.down_mbit, self.connection) def do_POST(self): if self.path != "/__up": @@ -159,7 +137,7 @@ def do_POST(self): self.respond(0) -def capture(command, prompt, columns, rows): +def capture(command, prompt, columns, rows, max_duration): screen = pyte.Screen(columns, rows) stream = pyte.ByteStream(screen) stream.feed(prompt.encode()) @@ -184,7 +162,9 @@ def capture(command, prompt, columns, rows): try: frames = [] start = time.monotonic() - while time.monotonic() - start < 90: + # Allow time for the CLI to print its final output and close the PTY. + capture_timeout = max_duration + CAPTURE_GRACE_SECONDS + while time.monotonic() - start < capture_timeout: if not select.select([master], [], [], 0.5)[0]: continue try: @@ -200,7 +180,9 @@ def capture(command, prompt, columns, rows): if not frames or frames[-1][1] != state: frames.append((time.monotonic() - start, state)) else: - raise RuntimeError("CLI did not finish within 90 seconds") + raise RuntimeError( + f"CLI did not finish within {capture_timeout} seconds" + ) return child.wait(timeout=3), frames finally: if child.poll() is None: @@ -323,6 +305,12 @@ def main(): "--scenario", choices=("clean", "retry", "partial"), default="clean" ) parser.add_argument("--max-payload-size", choices=tuple(SIZES), default="10m") + parser.add_argument( + "--max-duration", + type=int, + default=DEFAULT_MAX_DURATION, + help="CLI measurement deadline in seconds (default: %(default)s)", + ) parser.add_argument("--columns", type=int, default=100) parser.add_argument("--rows", type=int, default=27) parser.add_argument( @@ -343,6 +331,8 @@ def main(): parser.error(f"{args.binary} not found. Build the PR checkout first.") if not 1 <= args.columns <= 240 or not 1 <= args.rows <= 80: parser.error("Use a viewport between 1x1 and 240x80") + if args.max_duration <= 0: + parser.error("Use a positive --max-duration") if args.down_mbit <= 0 or args.up_mbit <= 0: parser.error("Use positive --down-mbit and --up-mbit rates") # Each sample also pays request setup on top of the transfer time, which @@ -353,12 +343,12 @@ def main(): for size in SIZES.values() if size <= SIZES[args.max_payload_size] ) - if estimated > DEADLINE_SECONDS: + if estimated > args.max_duration: print( f"warning: {args.max_payload_size} at {args.down_mbit:g}/{args.up_mbit:g} " - f"Mbit/s needs about {estimated:.0f} s and will hit the CLI's " - f"{DEADLINE_SECONDS} s deadline. Lower --max-payload-size or raise " - f"--max-duration.", + f"Mbit/s is estimated to take {estimated:.0f} s, exceeding the CLI's " + f"{args.max_duration} s deadline. Lower --max-payload-size or raise " + "--max-duration.", file=sys.stderr, ) @@ -371,13 +361,22 @@ def main(): flags = [ "--max-payload-size", args.max_payload_size, + "--max-duration", + str(args.max_duration), "--disable-dynamic-max-payload-size", "--server", url, ] - prompt = f"$ cfspeedtest --max-payload-size {args.max_payload_size} \\\r\n --disable-dynamic-max-payload-size --server {url}\r\n" + prompt = ( + f"$ cfspeedtest --max-payload-size {args.max_payload_size} --max-duration {args.max_duration} \\\r\n" + f" --disable-dynamic-max-payload-size --server {url}\r\n" + ) code, frames = capture( - [str(args.binary.resolve()), *flags], prompt, args.columns, args.rows + [str(args.binary.resolve()), *flags], + prompt, + args.columns, + args.rows, + args.max_duration, ) if not frames: raise RuntimeError("The CLI produced no output") From b09740c8eb45562089c0ae268a8eb937257dc113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=BCrgi?= Date: Sun, 29 Nov 2026 11:20:09 +0000 Subject: [PATCH 7/7] Point README examples at the refreshed previews --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25b7657..8e9bfa7 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,10 @@ Options: ``` Example usage: -![Terminal recording showing all eight transfer rows with the progress bar.](https://github.com/user-attachments/assets/03f87e7d-d8af-4bc9-a1de-ee09840d684d) +![Terminal recording showing all eight transfer rows with the progress bar.](https://github.com/user-attachments/assets/8802ba8b-518f-4fa1-8ec9-6b1bf7b4f312) Example with json-pretty output: -![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](https://github.com/user-attachments/assets/563166f2-79a7-4bbc-aa36-aefa3e953cf3) +![Start of the JSON document printed by cfspeedtest --output-format json-pretty.](https://github.com/user-attachments/assets/5a46f069-dda0-46b3-a6b8-eef4a71e4ce2) In human-readable mode, live progress is shown on stderr only when it is a terminal. When both stdout and stderr are terminals, each completed transfer size adds a row to the results table. Redirecting stdout keeps the end-of-run summary instead, without progress redraws. CSV and JSON modes never draw a progress bar.