Adding performance measurement code.