So, you want to profile function calls (trace and time them) on a live app?

If not, I’d suggest looking at Node profiler + flame graphs, e.g. with flamebearer library. Data collected by these tools give a good picture of what’s going on in the app and where potential bottlenecks are.

If you want to profile a live app with minimal configuration and boilerplate, then it’s much more tricky. I can’t imagine a good way to archive it with Async Hooks API or something else at the moment, but the problem sounds interesting and I’ll think of it a bit more in the next couple of days.

Distributed systems gazer. Node.js contributor. Occasional tech blogger and speaker.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store