Proof of Bandwidth

Is there a good/standard pattern for me to check how much data and/or the rate of transfer from one peer to another, in a specified period of time? Obvious use case is to incentivise actors that ensure greater throughput