Added code to calculate network throughput