Skip to content

fix(ci): redirect benchmark stderr to prevent output interleaving#85

Merged
laplaque merged 1 commit intomainfrom
fix/benchmark-stderr-redirect
Mar 30, 2026
Merged

fix(ci): redirect benchmark stderr to prevent output interleaving#85
laplaque merged 1 commit intomainfrom
fix/benchmark-stderr-redirect

Conversation

@laplaque
Copy link
Copy Markdown
Owner

Go benchmark output (stdout) was interleaved with anonymizer log lines (stderr), causing benchmark names and ns/op values to land on separate lines. The regex parsers in the threshold check, PR comment script, and badge update script expect both on a single line — so streaming benchmarks were silently skipped, resulting in 0ns / 20ms in the streaming badge.

Fix: redirect stderr to .tmp/benchmark-stderr.txt before piping stdout to tee.

One line changed in .github/workflows/ci.yml.

Go benchmark output (stdout) was interleaved with anonymizer log lines
(stderr) in the pipeline, causing the benchmark name and ns/op value to
land on separate lines. The threshold check and badge scripts use a regex
that expects both on a single line, so streaming benchmarks were silently
skipped — resulting in 0ns in the streaming badge.

Redirect stderr to .tmp/benchmark-stderr.txt so only clean benchmark
output reaches the downstream parsers.
@github-actions
Copy link
Copy Markdown

Benchmark results

Benchmark ns/op Budget Headroom Status
BenchmarkRegexPassEmail 1.7µs 2.5ms 99% ✅ PASS
BenchmarkRegexPassMultiple 2.6µs 2.5ms 99% ✅ PASS

Budget: regex/cache < 2.5ms (0.5% of 500ms baseline), streaming < 20ms (4% of 500ms baseline)

@laplaque laplaque merged commit 791c9f1 into main Mar 30, 2026
8 checks passed
@laplaque laplaque deleted the fix/benchmark-stderr-redirect branch March 30, 2026 20:41
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