Backport of Bitcoin Core PR12604 and PR12784
https://github.com/bitcoin/bitcoin/pull/12604
https://github.com/bitcoin/bitcoin/pull/12784
Details
- Reviewers
Fabien deadalnix - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Commits
- rSTAGING8b217943d251: Add DynamicMemoryUsage() to LevelDB
rABC8b217943d251: Add DynamicMemoryUsage() to LevelDB
make check
Run bitcoind with -debug=leveldb and check the log file for the LEVELDB category and the following pattern:
WriteBatch memory usage: db=..., before=...MiB, after=...MiB
Verify that printed sizes (before and after) make sense.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Your test plan is not testing for the change, please update it.
src/dbwrapper.cpp | ||
---|---|---|
175 ↗ | (On Diff #10961) | I don't get why memory usage is a double. My understanding is that it is an integer division which is casted into a double then printed with 1 decimal. I tested this to see whether I was missing something and couldn't get any value with a non-zero decimal. |
src/dbwrapper.cpp | ||
---|---|---|
175 ↗ | (On Diff #10961) | Yes, you are right, it is a bug. It is fixed here: https://github.com/jasonbcox/bitcoin/commit/e80716d3b (Pedantic: strictly speaking it is not a Cast it is a Floating–integral (implicit) conversion) |