Stats

33 Contributors: 1 Saturday, March 4, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Getting started with Nodes profiling

Introduction

The aim of this post is to get started with profiling nodejs application and how to make sense of this results to capture a bug or a memory leak. A nodejs running application is nothing but a v8 engine processes which is in many terms similar to a website running on a browser and we can basically capture all the metrics which are related to a website process for a node application.

The tool of my preference is chrome devtools or chrome inspector coupled with the node-inspector.

Remarks

The node-inspector fails to attach to the node bebug process sometimes in which case you will not be able to get the debug breakpoint in devtools .Try refreshing the devtools tab multiple times and wait for some seconds to see if it is in debug mode.

If not restart the node-inspector from command line.

Related Examples