TracePerf
lastmod 2025-03-30created 2025-03-301 edits
TracePerf: Advanced console logging & performance tracking for Node.js. Visualize execution flows with ASCII art, detect bottlenecks, and get optimization suggestions. Features structured logs, conditional modes, and memory tracking. Makes debugging faster and more intuitive.
A performance tracking/execution monitoring tool for Node.js
Features
- An open-source tool designed for efficient analysis of complex function flows and memory usage
- Supports both CommonJS and ESM environments, and a major advantage is that it provides the same API in the browser too
- High-performance execution time tracking: accurately measures function execution time with minimal overhead
- Memory usage tracking: tracks memory consumption per function and detects potential memory leaks
- Flexible tracking modes: choose a performance-focused, balanced, or detailed analysis mode depending on the purpose
- Execution flow visualization: displays complex function flows visually in an easy-to-read way
- Nested function tracking: can track even function calls within functions, enabling in-depth analysis
- Custom threshold detection: focus on functions that take longer than a configured execution time
- Sampling control: adjust the sampling rate to minimize performance impact in production environments
- Universal module compatibility: usable with both CommonJS and ESM modules
Same API in the browser and Node.js
- Unified tracking API: track the same way in both the browser and Node.js
- Same configuration: logger and tracker configuration is consistent across both environments
- Memory tracking support: both the browser and Node.js provide memory usage tracking
- Browser optimization: applies performance optimizations suited to the browser environment while keeping API compatibility
- Consistent execution flow tracking: complex execution flows can be tracked the same way regardless of the environment