Add a benchmarking function.