-
Notifications
You must be signed in to change notification settings - Fork 38
[V4] benchmark skeleton #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e151f86 to
f4647ef
Compare
3c49033 to
eb45861
Compare
769f57a to
5ee0048
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Introduces an initial benchmarking scaffold for libfork v4, alongside minor core/layout assertions and build/CI wiring to support running benchmarks in developer mode.
Changes:
- Add Google Benchmark target with an initial Fibonacci “serial” benchmark and shared helpers.
- Introduce
libfork_DEV_MODEto gate tests/benchmarks, and update presets/workflows to install benchmark dependencies. - Add a version header smoke test and refine internal promise/frame layout types/assertions.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test/src/version.cpp |
Adds a Catch2 test to validate version macros are present and reasonable. |
src/core/promise.cxx |
Refactors promise/frame layout structs and adds layout-related static_asserts. |
include/libfork/version.hpp |
Adds #pragma once to the public version header. |
include/libfork/macros.hpp |
Adds public macros for exception/no-exception builds (LF_TRY, LF_THROW, etc.). |
benchmark/src/libfork_benchmark/fib/serial.cpp |
Adds a baseline serial Fibonacci benchmark. |
benchmark/src/libfork_benchmark/fib/fib.hpp |
Adds shared Fibonacci parameters and a reference implementation. |
benchmark/src/libfork_benchmark/common.hpp |
Adds common benchmark helpers (result checking + exception integration). |
benchmark/CMakeLists.txt |
Defines the benchmark executable, dependencies, and a dry-run test hook. |
LICENSE.md |
Adds MPL 2.0 license text. |
CMakeUserPresets.json |
Adds a user preset workflow for benchmark builds/tests. |
CMakePresets.json |
Enables libfork_DEV_MODE in CI presets and tweaks release flags. |
CMakeLists.txt |
Adds libfork_DEV_MODE option and wires benchmarks/tests behind it; exports macros.hpp. |
.github/workflows/macos.yml |
Installs google-benchmark in CI. |
.github/workflows/linux.yml |
Installs google-benchmark in CI. |
.github/workflows/linear.yml |
Updates checkout action version and minor formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot please resolve the comments you have made on this PR and suggest any further improvements |
|
@ConorWilliams I've opened a new pull request, #49, to work on those changes. Once the pull request is ready, I'll request review from you. |
…prove error messages Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
|
@ConorWilliams I've opened a new pull request, #51, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com>
* mv license * same checkout version * move to frame * casting checks * cmake for benchmark * fib * add benchmark dep * new benchmark structure * pragma once on headers * version test * better version test * add src * strip prefix * bench preset * benchmark as a test * add benchmark test to preset * move to todo * use variables * drop no plt * rename * proper fib benchmark * drop todo * spell * macros * no-except safe * even better errors * exception safe * Resolve review comments: add include guard, fix macro evaluations, improve error messages Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Complete review comment resolution Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Add CodeQL symlink to .gitignore Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Update .gitignore * Add Fibonacci serial benchmark with direct return Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Complete: Add Fibonacci serial benchmark with direct return Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Remove CodeQL artifact and update gitignore Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Fix .gitignore formatting Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Remove doxygen-specific bits from macros.hpp Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * Complete removal of doxygen-specific bits Co-authored-by: ConorWilliams <47435400+ConorWilliams@users.noreply.github.com> * undo _codeql shenanigens * reoder bench naming convention * shorten * macros * prevent loop invariant lifting * spell * use do-not opt for basic fib as well
Add benchmark scaffolding (google benchmark)