From 528c2bc6ad03875865be8712aacdf319f7002d44 Mon Sep 17 00:00:00 2001 From: ssid Date: Tue, 29 Sep 2015 11:52:21 -0700 Subject: 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 --- include/leveldb/db.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/leveldb/db.h') 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 -- cgit v1.2.1