measure p2p latency by cases