Given a scenario where an application is experiencing performance issues, how would you diagnose the problem?