Looking at peer connection stats

I’m curious about mapping the network, specifically with the “network distances” between peers. Are there any connection statistics being stored about peers, such as through put or anything like that? I’m still learning my way through the code base but I’d curious if you could use the peer swarm connections that the computer is already making to generate an “internet traffic report” as seen by your node.