-
Notifications
You must be signed in to change notification settings - Fork 21
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
Feat/bucket stat #576
Feat/bucket stat #576
Conversation
WalkthroughThe changes introduce a new Changes
Poem
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
size-limit report 📦
|
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
Outside diff range and nitpick comments (1)
docs/axone-objectarium.md (1)
Line range hint
301-301
: Remove the bare URL to comply with best Markdown practices.- See [the LZMA wiki page](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) for more information. + See [the LZMA wiki page](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) for more information.Tools
Markdownlint
276-276: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
279-279: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- contracts/axone-objectarium/src/contract.rs (4 hunks)
- contracts/axone-objectarium/src/msg.rs (2 hunks)
- contracts/axone-objectarium/src/state.rs (2 hunks)
- docs/axone-objectarium.md (3 hunks)
Additional context used
Markdownlint
docs/axone-objectarium.md
301-301: null (MD034, no-bare-urls)
Bare URL used
148-148: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
175-175: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
177-177: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
178-178: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
186-186: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
187-187: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
195-195: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
196-196: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
204-204: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
205-205: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
217-217: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
225-225: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
226-226: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
234-234: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
245-245: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
246-246: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
254-254: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
257-257: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
267-267: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
270-270: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
275-275: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
276-276: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
279-279: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
290-290: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
291-291: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
292-292: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
293-293: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
294-294: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
295-295: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
313-313: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
314-314: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
324-324: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
325-325: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
369-369: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
370-370: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
371-371: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
425-425: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
426-426: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
427-427: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
428-428: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
429-429: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
430-430: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
438-438: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
439-439: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers
Additional comments not posted (9)
contracts/axone-objectarium/src/state.rs (1)
214-221
: The implementation of the conversion fromBucketStat
tomsg::BucketStat
is correct and idiomatic.contracts/axone-objectarium/src/msg.rs (2)
150-151
: The addition of thestat
field in theBucketResponse
struct aligns with the PR's objectives and is implemented correctly.
356-368
: TheBucketStat
struct is well-defined and appropriately captures the necessary statistics for a bucket.docs/axone-objectarium.md (1)
279-282
: The addition ofBucketStat
to theBucketResponse
is well-documented and aligns with the PR's objective to enhance bucket information queries.Tools
Markdownlint
279-279: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markerscontracts/axone-objectarium/src/contract.rs (5)
318-318
: Ensure theBucketStat
struct is properly integrated into theBucketResponse
.This change aligns with the PR's objective to include bucket statistics in the bucket information query, enhancing the functionality of the contract.
Line range hint
434-572
: Review the test suite for proper initialization and configuration.The tests are well-structured and cover various scenarios including initialization and configuration of buckets. It's good to see comprehensive tests that ensure the contract behaves as expected under different configurations.
Line range hint
17-33
: Proper handling of contract instantiation.The function correctly initializes a new bucket with the provided settings and ensures that the contract is non-payable. It also appropriately sets the contract version using environment variables, which is a best practice for maintainability.
Line range hint
35-50
: Effective handling of execution messages.The function correctly ensures that no funds are transferred with the transaction and routes different execution messages to their respective handling functions. This modular approach facilitates easier maintenance and scalability of the contract's functionality.
Line range hint
263-318
: Efficient handling of query messages.The function efficiently handles different types of query messages and correctly formats the responses as JSON binary. This ensures that the contract can effectively communicate with external clients or other contracts.
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.
Seems good 👍
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.
Looks good thx :)
Simple. Basic. Include bucket statistics in bucket information query as mentioned as described in issue #555.
Summary by CodeRabbit
New Features
BucketStat
to provide detailed statistics for each bucket, such as size, compressed size, and object count.Documentation
stat
field inBucketResponse
, detailing its subfields (compressed_size
,object_count
,size
).