Skip to content

CustomCommandManager + CustomCommandManagerSession to use auto-expandable maps #848

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

Merged
merged 21 commits into from
Dec 13, 2024

Conversation

TalZaccai
Copy link
Contributor

@TalZaccai TalZaccai commented Dec 4, 2024

  • Implementing ExpandableMap struct which maps a specified range of IDs to an array which doubles in size as needed.
  • Switching CustomCommandManager & CustomCommandManagerSession to use ExpandableMap instead of using set-sized arrays.
  • Adding tests to RespCustomCommandTests to test registration of multiple string commands, object commands, transactions and procedures.

Note: this relates to closed issue #834, which was addressed by temporary fix in PR #836.

Benchmark results:

main:

Method Params Mean Error StdDev Gen0 Allocated
CustomRawStringCommand ACL 409.1 us 7.60 us 7.11 us - -
CustomObjectCommand ACL 1,061.6 us 17.22 us 16.11 us 1.9531 24002 B
CustomTransaction ACL 1,738.7 us 31.31 us 49.66 us - 2 B
CustomProcedure ACL 1,264.8 us 14.86 us 13.90 us - 2 B
CustomRawStringCommand AOF 414.0 us 4.80 us 4.49 us - -
CustomObjectCommand AOF 1,227.9 us 16.35 us 15.30 us 1.9531 24002 B
CustomTransaction AOF 1,967.2 us 6.12 us 5.43 us - 4 B
CustomProcedure AOF 1,678.9 us 27.81 us 38.99 us - 2 B
CustomRawStringCommand None 403.5 us 7.81 us 7.31 us - -
CustomObjectCommand None 1,110.4 us 21.81 us 31.28 us 1.9531 24002 B
CustomTransaction None 1,732.3 us 12.80 us 9.99 us - 2 B
CustomProcedure None 1,229.2 us 24.41 us 21.64 us - 2 B

PR #848:

Method Params Mean Error StdDev Gen0 Allocated
CustomRawStringCommand ACL 411.1 us 1.74 us 1.63 us - -
CustomObjectCommand ACL 1,105.2 us 2.20 us 1.95 us 1.9531 24002 B
CustomTransaction ACL 1,668.7 us 20.38 us 19.07 us - 2 B
CustomProcedure ACL 1,205.2 us 1.04 us 0.93 us - 2 B
CustomRawStringCommand AOF 394.8 us 1.59 us 1.33 us - -
CustomObjectCommand AOF 1,221.4 us 3.30 us 2.92 us 1.9531 24002 B
CustomTransaction AOF 1,861.3 us 3.48 us 3.08 us - 2 B
CustomProcedure AOF 1,632.2 us 24.00 us 22.45 us - 2 B
CustomRawStringCommand None 402.2 us 1.39 us 1.30 us - -
CustomObjectCommand None 1,108.0 us 1.65 us 1.46 us 1.9531 24002 B
CustomTransaction None 1,646.6 us 5.77 us 5.11 us - 2 B
CustomProcedure None 1,209.7 us 2.49 us 1.95 us - 2 B

@TalZaccai TalZaccai requested a review from badrishc December 4, 2024 02:40
@TalZaccai TalZaccai changed the title CustomCommandsManager + CustomCommandManagerSession to use auto-expandable maps CustomCommandManager + CustomCommandManagerSession to use auto-expandable maps Dec 4, 2024
@TalZaccai TalZaccai merged commit f2c2261 into main Dec 13, 2024
18 checks passed
@TalZaccai TalZaccai deleted the talzacc/ccm_maps_fix branch December 13, 2024 02:49
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants