Skip to content

fix(micro): filter orphan 'bench:' lines before piping to benchmark-action#90

Merged
BryanFRD merged 1 commit intomainfrom
fix/micro-bench-orphan-lines
Apr 19, 2026
Merged

fix(micro): filter orphan 'bench:' lines before piping to benchmark-action#90
BryanFRD merged 1 commit intomainfrom
fix/micro-bench-orphan-lines

Conversation

@BryanFRD
Copy link
Copy Markdown
Contributor

Problem

Every FerrFlow PR has been failing `Micro Benchmarks` lately with exit 101. Root cause: criterion's `--output-format bencher` emits a handful of orphan lines:

```
bench: 158,352 ns/iter (+/- 5,760)
```

No `test ...` prefix. `benchmark-action/github-action-benchmark` sees them and panics on parse.

Fix

Filter `output.txt` to only the well-formed rows the action actually consumes:

```
grep -E '^test .+ ... bench:[[:space:]]+[0-9,]+ ns/iter' raw-output.txt > output.txt
```

Lossless — the comparison step reads no other line types.

Also prints the filtered output to the job log so the next time it goes sideways the raw vs filtered diff is inspectable.

Test plan

  • Re-run any recent failing PR job after this merges (e.g. FerrFlow PR #368) and confirm Micro Benchmarks goes green.

…ction

Criterion's bencher-format output occasionally emits lines like

  bench:     158,352 ns/iter (+/- 5,760)

without a preceding 'test <name> ...' prefix — benchmark-action/
github-action-benchmark blows up on those with exit 101 ('Error:
Invalid line'). Happens whenever criterion's group-ID formatting
interacts with pipe buffering.

Filter output.txt to only keep well-formed
'test <name> ... bench: N ns/iter (+/- M)' rows before the comparison
step reads it. The action doesn't use any other line types, so this
is lossless for our use.

Fixes the recurring red Micro Benchmarks check on every
FerrFlow-Org/FerrFlow PR.
@BryanFRD BryanFRD merged commit 88a87eb into main Apr 19, 2026
7 checks passed
@BryanFRD BryanFRD deleted the fix/micro-bench-orphan-lines branch April 19, 2026 09:10
BryanFRD added a commit that referenced this pull request Apr 22, 2026
…ction (#90)

Criterion's bencher-format output occasionally emits lines like

  bench:     158,352 ns/iter (+/- 5,760)

without a preceding 'test <name> ...' prefix — benchmark-action/
github-action-benchmark blows up on those with exit 101 ('Error:
Invalid line'). Happens whenever criterion's group-ID formatting
interacts with pipe buffering.

Filter output.txt to only keep well-formed
'test <name> ... bench: N ns/iter (+/- M)' rows before the comparison
step reads it. The action doesn't use any other line types, so this
is lossless for our use.

Fixes the recurring red Micro Benchmarks check on every
FerrFlow-Org/FerrFlow PR.
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