2023-06-03

NodeJS - Is it possible to enable Profiler on demand and not through the `--prof` flag?

Sometimes it's necessary to collect runtime info, mainly in production. But profiler have some overhead, so I don't want to enable it by default with the --prof flag but only when needed, for a short period.

Is it possible to enable it programmatically, by sending a signal to NodeJS process, similar like you enable the inspector with kill -SIGUSR1?



No comments:

Post a Comment