Compile native Rust benchmarks during check#22336
Conversation
Signed-off-by: Lucas Kruger <88447897+krugerLucas@users.noreply.github.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22336 +/- ##
=========================================
Coverage 73.37% 73.38%
+ Complexity 76063 76060 -3
=========================================
Files 6076 6076
Lines 345517 345517
Branches 49733 49733
=========================================
+ Hits 253528 253561 +33
+ Misses 71792 71701 -91
- Partials 20197 20255 +58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@reta Could you please rerun the failed |
Description
Adds Gradle verification coverage for native Rust benchmark targets so
checkcompiles them without running performance benchmarks.The native bridge build already compiles
opensearch-native-lib, butcargo build -p opensearch-native-libdoes not compile benchmark targets. That allowed files underbenches/to drift when Rust APIs changed without being caught by CI.This change:
cargoBenchCheckDataFusionandcargoBenchCheckParquetinsandbox/libs:dataformat-native.cargo bench -p ... --no-runforopensearch-datafusionandopensearch-parquet-format.check, keeping Gradle as the single build/check orchestration layer used locally and by CI.devprofile when-PrustDebugis set, matching the sandbox workflow's debug Rust mode while keeping this verification step focused on compilation.The benchmark source updates intentionally use neutral/default values for newly required API parameters:
DedicatedExecutor::new(..., 4)matches the benchmark's existing 4 worker thread executor setup.execute_queryoptional parameters are passed asNone, empty slices, andInternalSearch::Off, so the existing query benchmark path remains unchanged.DataFusionRuntime::new_for_bench(...)uses the benchmark-specific runtime constructor instead of manually constructing runtime internals.Validation:
Related Issues
Resolves #21538
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.