Re:Show HN: Made a small JavaScript benchmarking app – BenchJS
by jitl on Friday January 03, 2025 @09:53AM
(#42586115)
Start node with `node --inspect-brk …` or send SIGUSR1 to a running node process to expose the debug protocol port.
Then, connect with Chrome developer tools. You should see a NodeJS icon in the devtools if there’s a node process on your machine listening on the devtools port. You can use SSH port forwarding or similar to connect to processes on other machines like in a production environment.
Use the Chrome developer tools to take a profile, save it to disk, then analyze it using https://profiler.firefox.com
In production we use Datadog to collect and inspect profiles.
Re:Show HN: Made a small JavaScript benchmarking app – BenchJS
by _andrei_ on Friday January 03, 2025 @10:23AM
(#42586398)
Clinic.js was promising but it's not maintained anymore, would be great if we had a modern alternative: https://clinicjs.org/
I was wondering if there is a tool that can profile nodejs code? I did find some options(most of them are web tools) but they dont seem to give out information as much as mitata about what and where my code is used more often although mitata is a benchmarking tool.
What profilers do you use? Thanks :)