Refactored to separate CPU and memory metrics for better lack of cohesion