DEV Community

Danial Malik
Danial Malik

Posted on

How do you profile a node application?

I have a forum application, implemented in node and express, integrated with another project and is causing some serious latency issues for some routes and operations. I want to figure out the pieces of codes which are the bottlenecks for these slow operations and want to do some profiling. Is there any tool that could help me with that?
Right now I have written a middleware that calculates the total time for a request but It would be better if I could get something like a stack-trace along with the request URL, something like what django-silk provides for django applications.

Top comments (3)

Collapse
 
dmfay profile image
Dian Fay

node-clinic is the best profiling kit I'm aware of.

Collapse
 
danialmalik profile image
Danial Malik

I did look into that briefly and got the idea the thing I am looking for is it's "flame" module. But from the bird's eye view, it seemed a bit too complex. Can I get simple stack traces from it?

Collapse
 
danialmalik profile image
Danial Malik • Edited

Thanks . I'll look into that.