Skip to content

GH-45865: [C++] Create dedicated benchmark dependency in Meson - #45909

Merged
kou merged 2 commits into
apache:mainfrom
WillAyd:meson-benchmark-dep
Apr 9, 2025
Merged

kou merged 2 commits into
apache:mainfrom
WillAyd:meson-benchmark-dep

Conversation

@WillAyd

@WillAyd WillAyd commented Mar 24, 2025 •

Copy link
Copy Markdown
Contributor

Rationale for this change

This helps simplify the Meson configuration by conditionally creating an "Arrow Benchmark Dependency," which may be a disabler when benchmarks are not desired

What changes are included in this PR?

This is a refactor of the meson.build configuration files

Are these changes tested?

Yes

Are there any user-facing changes?

No

dependencies: [arrow_dep, gtest_main_dep],
)
endif
if needs_tests and needs_filesystem

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know if this is intentional to require both tests and the filesystem options to be enabled, but it mirrors what CMake currently requires

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's intentional. We can use this as a loadable filesystem.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #45865 has been automatically assigned in GitHub to PR creator.

Comment thread cpp/src/arrow/meson.build Outdated

arrow_benchmark_dep = declare_dependency(
link_with: [arrow_test_lib],
dependencies: [arrow_dep, gtest_main_dep, benchmark_dep],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we use benchmark_main instead of gtest_main for benchmark?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes we can. The only possible downside to doing so is that we would still need the gtest dependency, just without the main executable attached to it

dependencies: [arrow_dep, gtest_main_dep],
)
endif
if needs_tests and needs_filesystem

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's intentional. We can use this as a loadable filesystem.

Comment thread cpp/src/arrow/testing/meson.build Outdated
)
endif
if needs_tests and needs_filesystem
library(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to use shared_module() not library().

Comment thread cpp/src/arrow/testing/meson.build Outdated
library(
'arrow-filesystem-example',
sources: ['examplefs.cc'],
dependencies: [arrow_dep, gtest_main_dep],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
dependencies: [arrow_dep, gtest_main_dep],
dependencies: [arrow_dep, gtest_dep],

@WillAyd

WillAyd commented Apr 8, 2025

Copy link
Copy Markdown
Contributor Author

I believe I have addressed the feedback here but please let me know if anything is missing

@kou

kou commented Apr 9, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit meson

@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown

Revision: d9ec982

Submitted crossbow builds: ursacomputing/crossbow @ actions-f568938eb3

Task Status
test-conda-cpp-meson GitHub Actions

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit ccd0223.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them.

zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Apr 15, 2025
…pache#45909)

### Rationale for this change

This helps simplify the Meson configuration by conditionally creating an "Arrow Benchmark Dependency," which may be a disabler when benchmarks are not desired

### What changes are included in this PR?

This is a refactor of the meson.build configuration files

### Are these changes tested?

Yes

### Are there any user-facing changes?

No

* GitHub Issue: apache#45865

Authored-by: Will Ayd <william.ayd@icloud.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants