From ecec63df16ba51fde6a63c9610a8296fa81c3f54 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 24 Oct 2026 05:58:37 +0200 Subject: add traffic counter This introduces a new wrapper that counts messages and payload bytes per peer, split by kind (hello, helloReply, sync, ping, pong), each sent, received and refused. The traffic counter goes around the firewall, which means messages dropped outbound are still counted as sent, and messages dropped inbound don't count as received. --- src/api/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/api/mod.rs') diff --git a/src/api/mod.rs b/src/api/mod.rs index a2bd7e0..bf74de5 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -153,6 +153,9 @@ fn response_for_value( peers::PeerListResponse, peers::PeerLivenessStatus, peers::EpochInfo, + crate::transport::traffic::PeerTraffic, + crate::transport::traffic::ByKind, + crate::transport::traffic::Counter, ) ), tags( -- cgit v1.3.1