Page MenuHomePhabricator

log: improve checkaddrman logging with duration in milliseconds
ClosedPublic

Authored by PiRK on Nov 10 2022, 14:54.

Details

Summary

log, timer: allow not repeating log message on completion

log, timer: add LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE macro

that prints the descriptive message when logging the start
but not when logging the completion.

p2p: improve checkaddrman logging with duration in milliseconds

and update the function name to CheckAddrman (drop "Force") for
nicer log output as it is prefixed to each of these log messages:

2021-09-21T18:42:50Z [opencon] CheckAddrman: new 64864, tried 1690, total 66554 started
2021-09-21T18:42:50Z [opencon] CheckAddrman: completed (76.21ms)

The existing Doxygen documentation on the function already makes
clear that it is unaffected by m_consistency_check_ratio.

This is a backport of core#22872

Test Plan

ninja all check-all

src/bitcoind -debug=addrman -checkaddrman=10

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable