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

Getting compaction stats in a structured form #12986

Open
jecaro opened this issue Sep 3, 2024 · 1 comment
Open

Getting compaction stats in a structured form #12986

jecaro opened this issue Sep 3, 2024 · 1 comment

Comments

@jecaro
Copy link

jecaro commented Sep 3, 2024

I posted this issue to the dev group but didn't get any feedback. It is important so I'm posting a well here for greater visibility. I'd be happy to get feedback on how people address this issue.

The compaction stats are described in the wiki. They contain useful information to understand the compaction process.

Expected behavior

That data is not very usable in this form. It should be possible to have access to the compaction stats in a data structure. That data structure could then be pretty-printed as a table as described in the wiki. But having the stats in a structured form in the first place would be very useful for example to expose them as Prometheus metrics.

Actual behavior

The only way to get these compactions stats is by calling db->GetProperty("rocksdb.stats"); which returns a string. Then parse the string which is really inefficient given that data existed in private data structures at some point.

@jecaro
Copy link
Author

jecaro commented Sep 17, 2024

Some useful information about this topic can be found in the google group discussion.

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

No branches or pull requests

1 participant