Memory/CPU profiling

Memory/CPU Profiling

The profiling section allows you to take memory and CPU snapshots straight from your production servers. You will then get a file that can be inspected with the chrome developer tool.


You will need to install pmx and to add the v8-profiler dependency to your project:

$ npm install v8-profiler --save

Once the module is installed, restart your application and different buttons will appea on the Profiling pages:


Now click on the button to take a heapdump, it may take some time depending on the weight of the heap file. Once the heapdump file is ready the “Download” button will appear:


Click on the “Download” button. Once the download is complete, open up the Google Chrome developer tool (Ctrl+Shift+i), go to the Profiles tab and select the option Load:


Select the heapdump file you just downloaded and you will have an overview of your memory.

Tracking memory leaks

To track memory leak you will need multiple heapdump files and compare them to see which element is increasing over time.

To know more about memory analysis please follow this link.