Code for hardware benchmarking.