diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-11-05 23:44:54 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-11-05 23:45:30 +0100 |
commit | 40b6070ad7e84fa1fce920d9200edbf3facdbd6f (patch) | |
tree | b3abf0eb7f0c5b6cd8e5fecfd29845b93712275b /src/Makefile.am | |
parent | d9a45500018fa4fd52c9c9326f79521d93d99abb (diff) | |
parent | dcef9a2922317cb2849f397366b6c56d755db6c9 (diff) |
Merge #16805: logs: add timing information to FlushStateToDisk()
dcef9a2922317cb2849f397366b6c56d755db6c9 logs: add timing information to FlushStateToDisk() (James O'Beirne)
41edaf227a69bc4846d5996675e8763fdfe0f367 logs: add BCLog::Timer and related macros (James O'Beirne)
Pull request description:
It's currently annoying to detect FlushStateToDisk() calls when benchmarking since they have to be inferred from a drop in coins count from the `UpdateTip: ` log messages. This adds a new logging utility, `BCLog::Timer`, and some related macros that are generally useful for printing timing-related logging messages, and a message that is unconditionally written when the coins cache is flushed to disk.
```
2019-09-04T20:17:51Z FlushStateToDisk: write block and undo data to disk completed (3ms)
2019-09-04T20:17:51Z FlushStateToDisk: write block index to disk completed (370ms)
2019-09-04T20:17:51Z FlushStateToDisk: write coins cache to disk (2068451 coins, 294967kB) completed (21481ms)
```
ACKs for top commit:
laanwj:
Thanks, ACK dcef9a2922317cb2849f397366b6c56d755db6c9
ryanofsky:
Code review ACK dcef9a2922317cb2849f397366b6c56d755db6c9. No changes since last review other than moving code to new timer.h header
Tree-SHA512: 6d61e48a062d3edb48d0e056a6f0b1f8031773cc99289ee4544f8349d24526b88519e1e304009d56e428f1eaf76c857bf8e7e1c0b6873a6f270306accb5edc3d
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 8308388331..ff4f071a3c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -146,6 +146,7 @@ BITCOIN_CORE_H = \ dbwrapper.h \ limitedmap.h \ logging.h \ + logging/timer.h \ memusage.h \ merkleblock.h \ miner.h \ |