-
activeHandles(options) → {Array.<Object>}
-
Gathers information about all currently active handles. Active handles are obtained via
process._getActiveHandles
and location and name of each is resolved.Parameters:
Name Type Argument Description options
Object opts.handles
Array.<Object>= <optional>
handles to get info for (default:
process._getActiveHandles()
)opts.source
Boolean <optional>
include source (default:
true
), included either way ifhighlight=true
opts.highlight
Boolean <optional>
include highlighted source (default:
true
)opts.attachHandle
Boolean <optional>
attaches inspected handle for further inspection (default:
false
)Returns:
-
handles each with the following properties
- Type
- Array.<Object>
-
handle.msecs timeout specified for the handle
- Type
- Number
-
handle.fn the handle itself
- Type
- function
-
handle.name the name of the function, for anonymous functions this is the name it was assigned to
- Type
- String
-
handle.anonymous true if the function was anonymous
- Type
- Boolean
-
handle.source the raw function source
- Type
- String
-
handle.highlighted the highlighted source
- Type
- String
-
handle.location location information about the handle
- Type
- Object
-
handle.location.file full path to the file in which the handle was defined
- Type
- String
-
handle.location.line line where the handle was defined
- Type
- Number
-
handle.location.column column where the handle was defined
- Type
- Number
-
handle.location.inferredName name that is used when function declaration is anonymous
- Type
- String
-
-
activeHandles::hookSetInterval()
-
Hooks
setInterval
calls in order to expose the passed handle. NOTE: not needed inio.js >=v1.6.2
and will not hook for those versions.The handle is wrapped. In older node versions it is not exposed. The hooked version of
setInterval
will expose the wrapped callback so its information can be retrieved later.- Source:
-
activeHandles::print(options)
-
Convenience function that first calls @see activeHandles and prints the information to stdout.
Parameters:
Name Type Argument Description options
Object opts.highlight
Boolean <optional>
print highlighted source (default:
true
)