From 1a344f1fd77cbcab43acb532fd80de82e97b88db Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 15 Oct 2024 18:17:49 +0200 Subject: [PATCH] log reliability based on loss statistics Signed-off-by: Csaba Kiraly --- codexdht/private/eth/p2p/discoveryv5/protocol.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codexdht/private/eth/p2p/discoveryv5/protocol.nim b/codexdht/private/eth/p2p/discoveryv5/protocol.nim index b7a23b9..77afee3 100644 --- a/codexdht/private/eth/p2p/discoveryv5/protocol.nim +++ b/codexdht/private/eth/p2p/discoveryv5/protocol.nim @@ -1056,7 +1056,8 @@ proc debugPrintLoop(d: Protocol) {.async.} = debug "bucket", depth = b.getDepth, len = b.nodes.len, standby = b.replacementLen for n in b.nodes: - debug "node", n, rttMin = n.stats.rttMin.int, rttAvg = n.stats.rttAvg.int + debug "node", n, rttMin = n.stats.rttMin.int, rttAvg = n.stats.rttAvg.int, + reliability = n.seen.round(3) # bandwidth estimates are based on limited information, so not logging it yet to avoid confusion # trace "node", n, bwMaxMbps = (n.stats.bwMax / 1e6).round(3), bwAvgMbps = (n.stats.bwAvg / 1e6).round(3)