summaryrefslogtreecommitdiff
path: root/include/leveldb/db.h
diff options
context:
space:
mode:
authorssid <ssid@google.com>2015-09-29 11:52:21 -0700
committerChris Mumford <cmumford@chromium.org>2015-12-09 10:34:58 -0800
commit528c2bc6ad03875865be8712aacdf319f7002d44 (patch)
treeee74f4613524feb9c8b06a118192c984c2de4d09 /include/leveldb/db.h
parent359b6bcec28944972d0be503a78205b5cc574a9c (diff)
downloadleveldb-528c2bc6ad03875865be8712aacdf319f7002d44.tar.gz
Add "approximate-memory-usage" property to leveldb::DB::GetProperty
The approximate RAM usage of the database is calculated from the memory allocated for write buffers and the block cache. This is to give an estimate of memory usage to leveldb clients. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=104222307
Diffstat (limited to 'include/leveldb/db.h')
-rw-r--r--include/leveldb/db.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/leveldb/db.h b/include/leveldb/db.h
index 4c169bf..53c7068 100644
--- a/include/leveldb/db.h
+++ b/include/leveldb/db.h
@@ -115,6 +115,8 @@ class DB {
// about the internal operation of the DB.
// "leveldb.sstables" - returns a multi-line string that describes all
// of the sstables that make up the db contents.
+ // "leveldb.approximate-memory-usage" - returns the approximate number of
+ // bytes of memory in use by the DB.
virtual bool GetProperty(const Slice& property, std::string* value) = 0;
// For each i in [0,n-1], store in "sizes[i]", the approximate