Compute throughput in base.py.