vmware / splinterdb

High Performance Embedded Key-Value Store
https://splinterdb.org
Apache License 2.0
673 stars 56 forks source link

Refactor to save / print shmem usage stats using common struct. #610

Closed gapisback closed 6 months ago

gapisback commented 6 months ago

This commit refactors shared memory usage stats fields to drive-off shminfo_usage_stats{} struct entirely. Add platform_save_usage_stats(), used by platform_shm_print_usage().

This refactoring paves the way for upcoming PR #569 which is adding more memory-usage stats fields.


NOTE To the reviewer:

There is zero logic change here. It's mainly a data structural change, rearranging where the memory-usage stats fields are tracked. They now belong to a common struct, so most of the diffs are to access the new usage.<field> reference.

Minor enhancements in the memory usage stats tracking / printing code is done, for improved understanding of memory usage metrics.

netlify[bot] commented 6 months ago

Deploy Preview for splinterdb canceled.

Name Link
Latest commit 29337e815582f88147bd3951c9bc07a2d2ef7817
Latest deploy log https://app.netlify.com/sites/splinterdb/deploys/65b163d40cc3220008547b21
gapisback commented 6 months ago

@rtjohnso - This is the last of the peel-off precursor change sets, paving the ground for reviewing PR #569.

I am assigning this to you, optimistically, expecting that the CI-jobs will all succeed. There is no logic change in core shared memory mgmt itself, so I expect CI-jobs will all succeed.

If you can take a quick look at this, I can merge this immediatelywhen CI passes.

And then will start revamping the large part-3 change-set to prepare PR #569 for review.

gapisback commented 6 months ago

Gentle reminder @rtjohnso -- in the hope that this ping via this UI will somehow get through to you.

The CI-jobs have succeeded ... and I'm all ready to check this in. Can you give this a quick look, please?