-
Notifications
You must be signed in to change notification settings - Fork 61
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
test(x/interchainstaking/types): add BenchamrkIntentsFromString + minor perf #1637
Conversation
…or perf Following up with PR quicksilver-zone#896 from performance advisory quicksilver-zone#804, this change brings in the benchmark and also adds a minor performance improvement to further hoist into a global the cosmos-sdk.Dec value of 1, and also pre-allocate using a size hint. Updates quicksilver-zone#804
@odeke-em is attempting to deploy a commit to the quicksilver Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe updates introduce benchmark tests for the Changes
Poem
Tip Early Access Features
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- x/interchainstaking/types/bench_test.go (1 hunks)
- x/interchainstaking/types/msgs.go (2 hunks)
Additional comments not posted (3)
x/interchainstaking/types/bench_test.go (2)
16-53
: The benchmark setup forIntentsFromString
is correctly implemented and should provide reliable performance metrics.
55-117
: The benchmark setup forSetForValoper
is well-constructed, testing both typical and edge cases effectively.x/interchainstaking/types/msgs.go (1)
Line range hint
170-194
: The optimizations inIntentsFromString
function, including pre-allocation and the use of a precomputedoneDec
variable, are well-implemented and should improve performance.Also applies to: 201-201
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1637 +/- ##
=======================================
Coverage 63.72% 63.72%
=======================================
Files 194 194
Lines 13740 13740
=======================================
Hits 8756 8756
Misses 4130 4130
Partials 854 854
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
lgtm
Can you lint this @odeke-em so we can merge it please? |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you! |
Following up with PR #896 from performance advisory #804, this change brings in the benchmark and also adds a minor performance improvement to further hoist into a global the cosmos-sdk.Dec value of 1, and also pre-allocate using a size hint.
Updates #804