Skip to content

ci: add bench-regression workflow for crypto_primitives_bench#494

Open
moudyellaz wants to merge 1 commit into
mainfrom
moudy/bench-regression
Open

ci: add bench-regression workflow for crypto_primitives_bench#494
moudyellaz wants to merge 1 commit into
mainfrom
moudy/bench-regression

Conversation

@moudyellaz
Copy link
Copy Markdown
Collaborator

🎯 Purpose

Add a bench-regression GitHub workflow that uses boa-dev/criterion-compare-action to gate crypto_primitives_bench against the base branch on every PR that touches the watched paths. Follow-up to #488 (the criterion migration); deferred to this PR because the action needs the criterion bench to exist on both head and base.

⚙️ Approach

Workflow triggers on PRs touching tools/crypto_primitives_bench/**, key_protocol/**, nssa/core/**, or the workflow file itself. One job runs the action against the PR base, with cwd: tools/crypto_primitives_bench and benchName: primitives. The action posts the comparison as a PR comment.

  • Add .github/workflows/bench-regression.yml.

🧪 How to Test

Open this PR; the workflow self-triggers because it touches the watched path (the workflow file itself). The first run on this PR will compare against main and post a no-change diff (since this PR doesn't touch bench code).

🔗 Dependencies

#488 merged. Main now has tools/crypto_primitives_bench/benches/primitives.rs for the action to compare against.

🔜 Future Work

None.

📋 PR Completion Checklist

  • Complete PR description
  • Implement the core functionality
  • Add/update tests
  • Add/update documentation and inline comments

@github-actions
Copy link
Copy Markdown

Benchmark for 58134a0

Click to view benchmark
Test Base PR %
encryption/decrypt 634.9±1.70ns 634.0±2.32ns -0.14%
encryption/encrypt 866.3±7.75ns 818.4±6.83ns -5.53%
keychain/new_mnemonic 4.2±0.03ms 4.1±0.02ms -2.38%
keychain/new_os_random 4.1±0.02ms 4.1±0.04ms 0.00%
shared_secret_key/sender_dh 135.1±0.50µs 136.0±4.11µs +0.67%

Copy link
Copy Markdown
Collaborator

@Pravdyvy Pravdyvy left a comment

Choose a reason for hiding this comment

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

lgtm

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