This patch:
- updates the
logging/timer.h::Timer
class to allow not repeating the log message on completion - adds a
LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE
macro that prints the descriptive message when logging the start but not when logging the completion - updates the checkaddrman logging to log the duration, and renames the function like the
-checkaddrman
configuration option in order to prefix every log message withCheckAddrman
instead of the longer, less pleasant, and different-from-checkaddrmanForceCheckAddrman
(the Doxygen documentation on the function already makes clear that it is unaffected bym_consistency_check_ratio
).
before
02021-09-21T18:42:50Z [opencon] Addrman checks started: new 64864, tried 1690, total 66554
12021-09-21T18:42:50Z [opencon] Addrman checks completed successfully
after
02021-09-21T18:42:50Z [opencon] CheckAddrman: new 64864, tried 1690, total 66554 started
12021-09-21T18:42:50Z [opencon] CheckAddrman: completed (76.21ms)
To test, build and run bitcoind with -debug=addrman -checkaddrman=<n>
for a value of n
in the range of, say, 10 to 40.