Some cleanups and sanity-checking in the CPU and database metrics.