-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Need an api GetDbSize #318
Comments
Fixed in PR: 319 |
We'd like to keep the leveldb API small. Any program can easily calculate the database size by stat'ing the files in the leveldb database directory - and do so more accurately than this function which omits logs, etc. leveldb::DB::GetApproximateSizes() is warranted given that it supports a key range, but this looks easy to implement within the client. Please let me know if I've overlooked anything. |
Can you explain why leveldb::DB::GetApproximateSizes isn't sufficient? It measures the disk space of the key range (potentially all keys) and ignores files not in the db. |
Closing because it is unclear why |
In some usercases, we need to get the totol file size of leveldb, and we need to get this information in our C++ programs directly.
But there is no function in db.h that provide total file size of all level files.
I would like to create a PR to fix this. Please help to review.
Thanks.
The text was updated successfully, but these errors were encountered: