Add appstats to track performance.