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.
02019-09-04T20:17:51Z FlushStateToDisk: write block and undo data to disk completed (3ms)
12019-09-04T20:17:51Z FlushStateToDisk: write block index to disk completed (370ms)
22019-09-04T20:17:51Z FlushStateToDisk: write coins cache to disk (2068451 coins, 294967kB) completed (21481ms)