What use cases exist for async_hooks?

  • lifecycle tracking of libuv requests/handles
    - helps detect resource starvation
    - could probably provide some meta information to differentiate requests/handles
  • detecting blocking code
    - measuring sync execution time of each callback
    - helps to identify code that could be moved to worker threads
  • counting created promises
  • detecting port of new servers without monkey-patching

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store