This PR adds time duration for anchors.dat deserialization (following the same logic that peers.dat).
Also, it removes the quotes of "anchors.dat" in LogPrintf to follow the pattern of other logs.
p2p: add time when deserialize file db for ReadAnchors #21483
pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2021-03-time-anchors changing 1 files +4 −1-
brunoerg commented at 12:31 AM on March 20, 2021: member
- fanquake added the label P2P on Mar 20, 2021
- fanquake added the label Utils/log/libs on Mar 20, 2021
- brunoerg renamed this:
p2p, refactor: add time when deserialize file db for ReadAnchors
p2p: add time when deserialize file db for ReadAnchors
on Mar 20, 2021 -
DrahtBot commented at 10:56 AM on May 25, 2021: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
- DrahtBot added the label Needs rebase on Jun 17, 2021
- brunoerg force-pushed on Jun 17, 2021
- lsilva01 approved
-
lsilva01 commented at 7:55 PM on June 22, 2021: contributor
Tested ACK https://github.com/bitcoin/bitcoin/pull/21483/commits/1b897ed000b86458fb9642c4119777688932fd27 on Ubuntu 20.04
Loaded 2 addresses from anchors.dat 0msIs this time usually
0ms? -
MarcoFalke commented at 12:05 PM on October 22, 2021: member
Needs rebase if still relevant
-
p2p: add time when deserialize file db for ReadAnchors c7ace43d11
- brunoerg force-pushed on Oct 28, 2021
- DrahtBot removed the label Needs rebase on Oct 28, 2021
-
in src/addrdb.cpp:221 in c7ace43d11
213 | @@ -213,9 +214,11 @@ void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& a 214 | std::vector<CAddress> ReadAnchors(const fs::path& anchors_db_path) 215 | { 216 | std::vector<CAddress> anchors; 217 | + int64_t nStart = GetTimeMillis(); 218 | + 219 | try { 220 | DeserializeFileDB(anchors_db_path, anchors, CLIENT_VERSION | ADDRV2_FORMAT); 221 | - LogPrintf("Loaded %i addresses from %s\n", anchors.size(), fs::quoted(fs::PathToString(anchors_db_path.filename()))); 222 | + LogPrintf("Loaded %i addresses from %s %dms\n", anchors.size(), fs::PathToString(anchors_db_path.filename()), GetTimeMillis() - nStart);
laanwj commented at 7:59 AM on April 14, 2022:I'm not sure about moving away from fs::quoted here. There's also other places where quoted is used for logging. I'm not sure what's the plan there, but I'd like to avoid back-and-forth.
brunoerg commented at 1:02 PM on April 18, 2022:I agree.. I will close it.
brunoerg closed this on Apr 18, 2022DrahtBot locked this on Apr 18, 2023Labels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:14 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me