# Identifying the code consuming CPU resource

When you notice that CPU is unexpectedly overloaded (e.g. when monitoring CPU usage at Timeline page), you may want to identify which part of code is actually consuming CPU resource.

To identify the code consuming CPU resource:

1. Click the header of CPU column at threads table to sort.
2. Select the thread that has high load of CPU so that its stack traces are shown on right hand side, and find out which methods are being invoked.
3. Double-click the method in stack traces to check the code on Java editor.

Note: If the refresh is too fast to see the content, unselect Refresh toggle button [] at the local toolbar to disable refresh. Alternatively, you can change the period to update on preference page Window > Preferences > Java > Monitor > Period to update.