Real-time JavaScript performance profiling with function-level attribution and AI-powered remediation