Skip to content
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

Track live object set size during expensive checks #12846

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

sadhansood
Copy link
Contributor

Description

We would like to track the application level object set size vs db level object set size (which we already have from rocksdb metrics i.e. objects + indirect objects sst table size).
Adding this as a part of the expensive checks.

Test Plan

Existing tests

@vercel
Copy link

vercel bot commented Jul 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

6 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Jul 7, 2023 0:29am
explorer-storybook ⬜️ Ignored (Inspect) Jul 7, 2023 0:29am
multisig-toolkit ⬜️ Ignored (Inspect) Jul 7, 2023 0:29am
sui-kiosk ⬜️ Ignored (Inspect) Jul 7, 2023 0:29am
sui-wallet-kit ⬜️ Ignored (Inspect) Jul 7, 2023 0:29am
wallet-adapter ⬜️ Ignored (Inspect) Jul 7, 2023 0:29am

pending_objects.push(object);
size += match &object.data {
Data::Move(move_obj) => move_obj.contents().len(),
Data::Package(move_pkg) => move_pkg.size(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the same size that is used for storage cost computation? also this doesn't count coins, does it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind on the coins, i remembered that the coin storage format is converted to a move object when being loaded

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for package the storage cost is determined based on this function object_size_for_gas_metering which literally calls .size() for move_pkg. I think I could just call object_size_for_gas_metering on the object itself which makes it even simpler

@sadhansood sadhansood force-pushed the sadhan/live_object_set_size branch from 23a6b03 to e0aaf28 Compare July 5, 2023 21:54
@sadhansood sadhansood requested a review from mystenmark July 5, 2023 21:55
@sadhansood sadhansood force-pushed the sadhan/live_object_set_size branch from e0aaf28 to 8a9fc6e Compare July 7, 2023 00:29
@sadhansood sadhansood merged commit 935aa88 into main Jul 7, 2023
@sadhansood sadhansood deleted the sadhan/live_object_set_size branch July 7, 2023 01:04
ebmifa pushed a commit that referenced this pull request Jul 12, 2023
## Description 

We would like to track the application level object set size vs db level
object set size (which we already have from rocksdb metrics i.e. objects
+ indirect objects sst table size).
Adding this as a part of the expensive checks.

## Test Plan 

Existing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants