fix(ci): redirect benchmark stderr to prevent output interleaving#85
Merged
fix(ci): redirect benchmark stderr to prevent output interleaving#85
Conversation
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.
Benchmark results
Budget: regex/cache < 2.5ms (0.5% of 500ms baseline), streaming < 20ms (4% of 500ms baseline) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 / 20msin the streaming badge.Fix: redirect stderr to
.tmp/benchmark-stderr.txtbefore piping stdout totee.One line changed in
.github/workflows/ci.yml.