Repository navigation
Commit 8a0d305
fix(bench): pin the curl fixtures instead of fetching a random payload
The curl and wget cases fetched https://mockhttp.org/json/1, which returns a
randomly chosen body per request:
call 1: 152 bytes {"metrics":...
call 2: 244 bytes {"config":...
call 3: 102 bytes {"message":...
bench() calls the raw command and the rtk command separately, so the two sides
received different payloads and the ratio between them was noise. Whether the
build passed was a coin flip on which pair it drew — it passed on develop at
3cb7107 and failed twice on the very next PR, which touched no filter code.
That matters more now that CD's ci-gate blocks releases on CI: a third party's
mock API sat in the critical path of every release.
Points all three cases at pinned file:// fixtures. curl and the filter stay in
the loop; only the nondeterminism goes. Note rtk passes JSON through unchanged,
so these cases will now sit honestly at ~0% savings rather than swinging between
a fake win and a build failure.
There is no filter defect here: core::guard::never_worse already prevents rtk
emitting more tokens than raw, and curl routes through it via emit_guarded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent dedd23c commit 8a0d305
4 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
348 | 357 | | |
349 | | - | |
350 | | - | |
| 358 | + | |
| 359 | + | |
351 | 360 | | |
352 | 361 | | |
353 | 362 | | |
354 | 363 | | |
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
358 | | - | |
| 367 | + | |
| 368 | + | |
359 | 369 | | |
360 | 370 | | |
361 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments