Swiftorial Logo
Home
Swift Lessons
Tutorials
Learn More
Career
Resources

Node.js FAQ: Top Questions

30. What are performance hooks in Node.js?

Performance hooks , part of the perf_hooks module, provide APIs to measure and monitor application performance, including timing and custom metrics.

  • PerformanceEntry: Records events like function execution time.
  • Methods: performance.now , performance.mark , performance.measure .
  • Node.js Specific: Tracks GC, HTTP, and event loop delays.
  • Use Case: Profiling, optimizing application performance.