Improve accounting in throughput script