Skip to content

Conversation

@Xenira
Copy link
Member

@Xenira Xenira commented Dec 11, 2025

Refs: #599

Description

Adds basic benchmarking infrastructure

TODO:

  • CI/CD integration
  • Some more basic benchmarks as baseline

Checklist

Check the boxes that apply (put an x in the brackets, like [x]). You can also check boxes after the PR is created.

❤️ Thank you for your contribution!

@Xenira Xenira linked an issue Dec 11, 2025 that may be closed by this pull request
1 task
@coveralls
Copy link

coveralls commented Dec 11, 2025

Pull Request Test Coverage Report for Build 20247651182

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 36.015%

Totals Coverage Status
Change from base Build 20244150814: 0.0%
Covered Lines: 1652
Relevant Lines: 4587

💛 - Coveralls

@Xenira Xenira force-pushed the 599-add-performance-test-infrastructure branch 8 times, most recently from 55a35b4 to d5bc0a9 Compare December 15, 2025 19:46
@Xenira Xenira force-pushed the 599-add-performance-test-infrastructure branch from d5bc0a9 to 60971aa Compare December 15, 2025 19:46
@Xenira
Copy link
Member Author

Xenira commented Dec 15, 2025

Example upload https://bencher.php.rs/perf/ext-php-rs

CI upload only works once this is merged.

@Xenira Xenira marked this pull request as ready for review December 15, 2025 21:14
@Xenira
Copy link
Member Author

Xenira commented Dec 15, 2025

@ptondereau I think this works as an initial implementation. We should extend this further especially before tackling any performance issues.

@Xenira Xenira requested a review from ptondereau December 15, 2025 21:19
Copy link
Member

@ptondereau ptondereau left a comment

Choose a reason for hiding this comment

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

Look great! I tested it locally and am showing some good results indeed.
Some nitpicks

name: Run PR Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v6

name: Archive closed PR branch with Bencher
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v6

name: Run PR Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v6

name: benchmark_results.txt
path: ./benchmark_results.txt
- name: Upload Pull Request Event
uses: actions/upload-artifact@v4
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6

- name: Run Benchmarks
run: cargo bench --manifest-path ./benches/Cargo.toml > benchmark_results.txt
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6

for i in 0..n {
callback
.try_call(vec![&i])
.expect("Failed to call function");
Copy link
Member

Choose a reason for hiding this comment

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

Is there a more graceful way to report an error here instead of panicking for the benchmark?

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.

Add performance test infrastructure

4 participants