I am trying to work out what part of a website is causing a CPU spike. What I have noticed is that when a javascript button is clicked to add an item to a cart it causes the CPU to spike to 30/40% and if there are 3 people doing this the CPU hits 100% and the site responds very slowly.
I am a bit stuck on how to debug this issue and to find what exactly is causing the issue.
Can anyone advise on any tools to use please?
Thanks in advance for any replies!