Skip to content

Conversation

@theturtle32
Copy link
Owner

Summary

  • Strip ANSI escape sequences (color/formatting codes) from benchmark output before displaying in GitHub Actions summary
  • Uses sed to remove terminal control characters for clean, readable output

Changes

  • Updated .github/workflows/performance.yml to pipe benchmark output through sed 's/\x1b\[[0-9;]*m//g' before appending to summary

Test Plan

  • PR will trigger performance workflow
  • Verify GitHub Actions summary displays clean benchmark results without control codes

🤖 Generated with Claude Code

Use sed to remove ANSI escape sequences (color/formatting codes) before
appending benchmark results to the GitHub Actions summary, ensuring clean,
readable output without terminal control characters.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

Claude Code and others added 4 commits October 6, 2025 19:30
- Parse JSON output with jq to create formatted markdown table
- Add thousand separators to operations/sec column
- Convert time values from seconds to milliseconds
- Include both markdown table and raw terminal output
- Terminal output still has ANSI codes stripped

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Values are already in milliseconds, removed incorrect *1000 multiplication
- Reordered columns to match ASCII output: Hz, Min, Max, Mean, P75, P99, P995, P999
- Fixed thousands separator to handle large numbers correctly (e.g., 4,198,728)
- Uses recursive add_commas function instead of regex

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Created scripts/format-benchmarks.mjs to parse JSON and generate markdown
- Simplified GitHub Actions workflow to call the script
- Script is easier to test locally and maintain
- Maintains same output format: table with Hz, Min, Max, Mean, P75, P99, P995, P999

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Updated formatNumber function to round to 4 decimal places instead of 2,
providing more precise timing measurements for fast operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@theturtle32 theturtle32 merged commit ae27ddd into v2 Oct 6, 2025
4 checks passed
@theturtle32 theturtle32 deleted the fix-benchmark-ansi-codes branch October 6, 2025 19:50
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.

2 participants