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.
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.