diff options
author | Evan Klitzke <evan@eklitzke.org> | 2018-03-05 14:24:12 -0500 |
---|---|---|
committer | Evan Klitzke <evan@eklitzke.org> | 2018-03-06 00:25:39 -0500 |
commit | 741f0177c53ae536801a67c8ec194d6be3505d2d (patch) | |
tree | 78ede3487e47ecbce7c72b54e4d444d73d526afb /src/dbwrapper.h | |
parent | 47a7666dbe385cf138fa3cc0d48bb04507d11af2 (diff) |
Add DynamicMemoryUsage() to LevelDB
This adds a DynamicMemoryUsage() method similar to the existing methods
of the same name, and adds logging of memory usage to
CDBWrapper::WriteBatch.
Diffstat (limited to 'src/dbwrapper.h')
-rw-r--r-- | src/dbwrapper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dbwrapper.h b/src/dbwrapper.h index a29938ce33..6f80eedc7a 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -198,6 +198,9 @@ private: //! the database itself leveldb::DB* pdb; + //! the name of this database + std::string m_name; + //! a key used for optional XOR-obfuscation of the database std::vector<unsigned char> obfuscate_key; @@ -284,6 +287,9 @@ public: bool WriteBatch(CDBBatch& batch, bool fSync = false); + // Get an estimate of LevelDB memory usage (in bytes). + size_t DynamicMemoryUsage() const; + // not available for LevelDB; provide for compatibility with BDB bool Flush() { |