Skip to content

[MOD-10177] Rust benchmark for numeric encoder and decoder#6336

Merged
chesedo merged 31 commits intomasterfrom
migrate_encoders_decoders_bencher
Jun 24, 2025
Merged

[MOD-10177] Rust benchmark for numeric encoder and decoder#6336
chesedo merged 31 commits intomasterfrom
migrate_encoders_decoders_bencher

Conversation

@chesedo
Copy link
Collaborator

@chesedo chesedo commented Jun 17, 2025

Describe the changes in the pull request

This creates a Rust benchmark runner for the C numeric encoder and decoder only. This will serve as a base for more encoder / decoder benchmarks.

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@chesedo chesedo force-pushed the migrate_encoders_decoders_bencher branch from 8e072eb to 0c1ac1e Compare June 17, 2025 12:52
This creates a Rust benchmark runner for the C numeric encoder and
decoder only. This will serve as a base for more encoder / decoder benchmarks.
@chesedo chesedo force-pushed the migrate_encoders_decoders_bencher branch from 0c1ac1e to 642d30d Compare June 18, 2025 06:46
@chesedo chesedo changed the title Rust benchmark for numeric encoder and decoder [MOD-10177] Rust benchmark for numeric encoder and decoder Jun 18, 2025
chesedo added 2 commits June 18, 2025 08:55
The benchmarks are using the Rust wrapper instead.
@chesedo chesedo requested a review from LukeMathWalker June 18, 2025 12:20
chesedo added 7 commits June 18, 2025 16:03
This allows us to not worry about growth allocations and correctly
clears the memory after the buffer was used.
We won't need this as the output of the C and Rust should be exactly the
same. So there is no memory usage to compare.
Missed fix for new file coming from master.
@chesedo chesedo requested a review from LukeMathWalker June 19, 2025 08:56
@chesedo chesedo marked this pull request as ready for review June 19, 2025 08:57
@chesedo chesedo requested a review from BenGoldberger June 19, 2025 08:57
@chesedo chesedo requested a review from LukeMathWalker June 19, 2025 10:11
LukeMathWalker
LukeMathWalker previously approved these changes Jun 19, 2025
@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 88 lines in your changes missing coverage. Please review.

Project coverage is 88.76%. Comparing base (741f7cb) to head (f8d0076).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/redisearch_rs/inverted_index/src/lib.rs 0.00% 76 Missing ⚠️
src/inverted_index/inverted_index.c 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6336      +/-   ##
==========================================
- Coverage   88.84%   88.76%   -0.09%     
==========================================
  Files         247      250       +3     
  Lines       41213    41503     +290     
  Branches     3483     3632     +149     
==========================================
+ Hits        36617    36839     +222     
- Misses       4553     4615      +62     
- Partials       43       49       +6     
Flag Coverage Δ
flow 81.35% <0.00%> (-0.30%) ⬇️
unit 46.95% <0.00%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

We should not want to grow the buffer for the inverted index tests and
benchmarks since that belongs in the buffer code. Instead we should
always make a buffer that is big enough for whatever is encoded into it.
This removes the `new` and add a `with_capacity` to make sure we always
use the test buffer in this way.
@chesedo chesedo added this pull request to the merge queue Jun 24, 2025
Merged via the queue into master with commit f0ecb9e Jun 24, 2025
21 of 22 checks passed
@chesedo chesedo deleted the migrate_encoders_decoders_bencher branch June 24, 2025 09:53
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.

4 participants