Add some performance measurements to the code.