0x is a command-line profiling tool that generates interactive flamegraphs for Node.js applications.
The tool addresses the need to identify performance bottlenecks and hot paths in Node code. It works by attaching to a running Node process, collecting stack trace samples, and converting them into an interactive flamegraph visualization. Users trigger profiling by sending SIGINT or SIGTERM (typically via Ctrl+C), after which 0x processes the collected stacks and generates an HTML file containing the flamegraph UI. The approach requires only a single command to start profiling and works across any operating system where Node runs.
The tool suits developers who need quick, ad-hoc profiling of Node applications without complex setup. It works well for both local development and production servers, with dedicated documentation for production-friendly approaches. The flamegraph output opens in Chrome or other browsers, though Chrome provides the full interactive experience. The tool supports Node v20.x and above and offers command-line options to customize behavior, such as automatically running load-test commands against the profiled process via the --on-port flag, which captures the port the application opens and injects it into a test command.
Development activity shows consistent maintenance with regular updates to keep pace with Node.js releases. The project accepts contributions and maintains documentation covering both standard usage and production deployment scenarios. The codebase remains actively refined to support the latest Node versions and improve the profiling and visualization experience.