Ping example using go-libp2p
Based on https://docs.libp2p.io/tutorials/getting-started/go/ with some improvements. ;)
go run .
Copy the address from the output.
In a separate console
go run . <address>
The second node will ping the first one and print the latency.
Hint: you can run it also against js-libp2p-ping