Skip to content

fix: improve CI benchmark table in PR#1663

Merged
hsluoyz merged 5 commits intoapache:masterfrom
knyk-dev:master
Jan 8, 2026
Merged

fix: improve CI benchmark table in PR#1663
hsluoyz merged 5 commits intoapache:masterfrom
knyk-dev:master

Conversation

@knyk-dev
Copy link
Contributor

@knyk-dev knyk-dev commented Jan 8, 2026

The benchmark process is divided into two separate workflows to resolve permission restrictions.

A Python script is implemented to post-process the benchmark output. Results are formatted with clear percentages and emojis (🚀/🐌) to ensure performance changes are easily understood.

And the automatic posting of results as pull request comments is optimized through new scripts. These changes are made to enhance both the security and readability of the CI process.

@knyk-dev knyk-dev changed the title chore: optimization of benchmark workflows and result formatting ci: optimize benchmark workflows and result formatting Jan 8, 2026
@hsluoyz hsluoyz requested a review from Copilot January 8, 2026 03:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the benchmark workflow to improve security by separating it into two workflows: one that runs benchmarks without write permissions, and another that posts comments with appropriate permissions. A Python script is added to format benchmark results with visual indicators (emojis) for performance changes.

Key changes:

  • Split benchmark workflow into two separate workflows to follow GitHub Actions security best practices
  • Added Python script to post-process benchmark output with percentage formatting and emoji indicators
  • Upgraded Go version from '1.21' to 'stable' for automatic latest version usage

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
.github/workflows/performance-pr.yml Removed write permissions, changed to upload artifacts instead of directly posting comments, upgraded Go version
.github/workflows/comment.yml New workflow that triggers on workflow_run completion to post PR comments with write permissions
.github/scripts/post_comment.js Script to validate artifacts and post/update benchmark comments on PRs
.github/scripts/download_artifact.js Script to download benchmark artifacts from the completed workflow run
.github/scripts/benchmark_formatter.py Python script to parse and format benchmark output with percentages and visual indicators

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

knyk-dev and others added 4 commits January 8, 2026 12:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hsluoyz hsluoyz changed the title ci: optimize benchmark workflows and result formatting fix: improve CI benchmark table in PR Jan 8, 2026
@hsluoyz hsluoyz merged commit f1f03cc into apache:master Jan 8, 2026
6 of 7 checks passed
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🎉 This PR is included in version 3.8.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants