How to collect logs such as RTT and Avg RTT on Mininet?

Can anybody please guide me on how we can get logs for RTT and Avg RTT on Mininet while using custom topology code provided in examples. Hoping for your response .